home *** CD-ROM | disk | FTP | other *** search
Unknown | 2009-04-20 | 150.1 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| d1 f2 0d 0a dd 8f ea 49 | 63 00 00 00 00 00 00 00 |.......I|c.......|
|00000010| 00 20 00 00 00 40 00 00 | 00 73 3a 07 00 00 64 00 |. ...@..|.s:...d.|
|00000020| 00 5a 00 00 64 01 00 64 | 02 00 64 03 00 64 04 00 |.Z..d..d|..d..d..|
|00000030| 64 05 00 64 06 00 64 07 | 00 64 08 00 64 09 00 64 |d..d..d.|.d..d..d|
|00000040| 0a 00 64 0b 00 64 0c 00 | 64 0d 00 64 0e 00 64 0f |..d..d..|d..d..d.|
|00000050| 00 64 10 00 64 11 00 64 | 12 00 64 13 00 64 14 00 |.d..d..d|..d..d..|
|00000060| 64 15 00 64 16 00 64 17 | 00 64 18 00 64 19 00 67 |d..d..d.|.d..d..g|
|00000070| 19 00 5a 01 00 64 1a 00 | 64 1b 00 6b 02 00 5a 03 |..Z..d..|d..k..Z.|
|00000080| 00 64 1a 00 64 1b 00 6b | 04 00 5a 05 00 79 23 00 |.d..d..k|..Z..y#.|
|00000090| 64 1a 00 64 1c 00 6b 06 | 00 6c 07 00 5a 08 00 01 |d..d..k.|.l..Z...|
|000000a0| 65 08 00 64 1d 00 64 1e | 00 83 02 00 5a 09 00 57 |e..d..d.|....Z..W|
|000000b0| 6e 1c 00 04 65 0a 00 6a | 0a 00 6f 10 00 01 01 01 |n...e..j|..o.....|
|000000c0| 01 64 1f 00 84 00 00 5a | 09 00 6e 02 00 01 58 64 |.d.....Z|..n...Xd|
|000000d0| 0f 00 5a 0b 00 64 10 00 | 5a 0c 00 64 11 00 5a 0d |..Z..d..|Z..d..Z.|
|000000e0| 00 64 12 00 5a 0e 00 64 | 13 00 5a 0f 00 64 14 00 |.d..Z..d|..Z..d..|
|000000f0| 5a 10 00 64 15 00 5a 11 | 00 64 16 00 5a 12 00 64 |Z..d..Z.|.d..Z..d|
|00000100| 06 00 65 13 00 66 01 00 | 64 20 00 84 00 00 83 00 |..e..f..|d ......|
|00000110| 00 59 5a 14 00 64 07 00 | 65 14 00 66 01 00 64 21 |.YZ..d..|e..f..d!|
|00000120| 00 84 00 00 83 00 00 59 | 5a 15 00 64 08 00 65 14 |.......Y|Z..d..e.|
|00000130| 00 66 01 00 64 22 00 84 | 00 00 83 00 00 59 5a 16 |.f..d"..|.....YZ.|
|00000140| 00 64 23 00 65 16 00 66 | 01 00 64 24 00 84 00 00 |.d#.e..f|..d$....|
|00000150| 83 00 00 59 5a 17 00 64 | 09 00 65 14 00 65 18 00 |...YZ..d|..e..e..|
|00000160| 66 02 00 64 25 00 84 00 | 00 83 00 00 59 5a 19 00 |f..d%...|....YZ..|
|00000170| 64 26 00 65 16 00 66 01 | 00 64 27 00 84 00 00 83 |d&.e..f.|.d'.....|
|00000180| 00 00 59 5a 1a 00 64 28 | 00 65 16 00 65 18 00 66 |..YZ..d(|.e..e..f|
|00000190| 02 00 64 29 00 84 00 00 | 83 00 00 59 5a 1b 00 64 |..d)....|...YZ..d|
|000001a0| 0a 00 65 14 00 66 01 00 | 64 2a 00 84 00 00 83 00 |..e..f..|d*......|
|000001b0| 00 59 5a 1c 00 64 2b 00 | 65 16 00 66 01 00 64 2c |.YZ..d+.|e..f..d,|
|000001c0| 00 84 00 00 83 00 00 59 | 5a 1d 00 64 0b 00 65 14 |.......Y|Z..d..e.|
|000001d0| 00 66 01 00 64 2d 00 84 | 00 00 83 00 00 59 5a 1e |.f..d-..|.....YZ.|
|000001e0| 00 64 0c 00 65 14 00 66 | 01 00 64 2e 00 84 00 00 |.d..e..f|..d.....|
|000001f0| 83 00 00 59 5a 1f 00 64 | 0d 00 65 1c 00 65 1e 00 |...YZ..d|..e..e..|
|00000200| 66 02 00 64 2f 00 84 00 | 00 83 00 00 59 5a 20 00 |f..d/...|....YZ .|
|00000210| 64 0e 00 65 1c 00 65 1e | 00 65 1f 00 66 03 00 64 |d..e..e.|.e..f..d|
|00000220| 30 00 84 00 00 83 00 00 | 59 5a 21 00 65 15 00 65 |0.......|YZ!.e..e|
|00000230| 19 00 65 1c 00 65 20 00 | 65 1e 00 65 21 00 65 16 |..e..e .|e..e!.e.|
|00000240| 00 65 1f 00 67 08 00 5a | 22 00 68 04 00 65 16 00 |.e..g..Z|".h..e..|
|00000250| 65 17 00 36 65 16 00 65 | 1a 00 36 65 16 00 65 1b |e..6e..e|..6e..e.|
|00000260| 00 36 65 16 00 65 1d 00 | 36 5a 23 00 79 10 00 64 |.6e..e..|6Z#.y..d|
|00000270| 1a 00 64 1b 00 6b 24 00 | 5a 24 00 57 6e 44 00 04 |..d..k$.|Z$.WnD..|
|00000280| 65 0a 00 6a 0a 00 6f 38 | 00 01 01 01 01 64 1a 00 |e..j..o8|.....d..|
|00000290| 64 1b 00 6b 25 00 5a 25 | 00 64 31 00 65 26 00 66 |d..k%.Z%|.d1.e&.f|
|000002a0| 01 00 64 32 00 84 00 00 | 83 00 00 59 5a 27 00 65 |..d2....|...YZ'.e|
|000002b0| 27 00 83 00 00 5a 24 00 | 5b 25 00 5b 27 00 6e 02 |'....Z$.|[%.['.n.|
|000002c0| 00 01 58 79 0b 00 65 24 | 00 69 28 00 01 57 6e 4b |..Xy..e$|.i(..WnK|
|000002d0| 00 04 65 29 00 6a 0a 00 | 6f 3f 00 01 01 01 01 65 |..e).j..|o?.....e|
|000002e0| 2a 00 65 24 00 69 2b 00 | 83 00 00 64 33 00 83 02 |*.e$.i+.|...d3...|
|000002f0| 00 6f 10 00 01 65 24 00 | 69 2b 00 83 00 00 60 2c |.o...e$.|i+....`,|
|00000300| 00 6e 01 00 01 64 34 00 | 84 00 00 5a 2d 00 64 35 |.n...d4.|...Z-.d5|
|00000310| 00 84 00 00 5a 2e 00 6e | 46 00 01 58 65 24 00 69 |....Z..n|F..Xe$.i|
|00000320| 28 00 83 00 00 5a 28 00 | 65 2a 00 65 28 00 64 33 |(....Z(.|e*.e(.d3|
|00000330| 00 83 02 00 6f 0a 00 01 | 65 28 00 60 2c 00 6e 01 |....o...|e(.`,.n.|
|00000340| 00 01 65 28 00 64 36 00 | 84 01 00 5a 2e 00 65 28 |..e(.d6.|...Z..e(|
|00000350| 00 64 37 00 84 01 00 5a | 2d 00 5b 24 00 5b 28 00 |.d7....Z|-.[$.[(.|
|00000360| 65 2f 00 64 38 00 84 01 | 00 5a 30 00 64 01 00 65 |e/.d8...|.Z0.d..e|
|00000370| 26 00 66 01 00 64 39 00 | 84 00 00 83 00 00 59 5a |&.f..d9.|......YZ|
|00000380| 31 00 65 32 00 64 3a 00 | 84 01 00 5a 33 00 65 05 |1.e2.d:.|...Z3.e.|
|00000390| 00 69 34 00 69 35 00 65 | 31 00 83 01 00 01 67 00 |.i4.i5.e|1.....g.|
|000003a0| 00 04 5a 36 00 65 31 00 | 69 37 00 69 38 00 83 00 |..Z6.e1.|i7.i8...|
|000003b0| 00 44 5d 21 00 5a 39 00 | 65 39 00 69 3a 00 64 3b |.D]!.Z9.|e9.i:.d;|
|000003c0| 00 83 01 00 6f 0b 00 01 | 65 36 00 65 39 00 12 6e |....o...|e6.e9..n|
|000003d0| 01 00 01 71 94 03 5b 36 | 00 5a 3b 00 78 38 00 65 |...q..[6|.Z;.x8.e|
|000003e0| 3b 00 44 5d 30 00 5a 39 | 00 65 39 00 64 3c 00 1f |;.D]0.Z9|.e9.d<..|
|000003f0| 69 3c 00 83 00 00 5a 3d | 00 65 3e 00 83 00 00 65 |i<....Z=|.e>....e|
|00000400| 3d 00 19 5a 3f 00 65 39 | 00 65 31 00 69 40 00 65 |=..Z?.e9|.e1.i@.e|
|00000410| 3f 00 3c 71 c5 03 57 5b | 39 00 5b 3f 00 5b 3d 00 |?.<q..W[|9.[?.[=.|
|00000420| 5b 3b 00 64 3d 00 65 26 | 00 66 01 00 64 3e 00 84 |[;.d=.e&|.f..d>..|
|00000430| 00 00 83 00 00 59 5a 41 | 00 64 02 00 65 26 00 66 |.....YZA|.d..e&.f|
|00000440| 01 00 64 3f 00 84 00 00 | 83 00 00 59 5a 42 00 64 |..d?....|...YZB.d|
|00000450| 40 00 65 26 00 66 01 00 | 64 41 00 84 00 00 83 00 |@.e&.f..|dA......|
|00000460| 00 59 5a 43 00 64 42 00 | 64 43 00 84 01 00 5a 44 |.YZC.dB.|dC....ZD|
|00000470| 00 68 10 00 64 44 00 64 | 45 00 36 64 46 00 64 47 |.h..dD.d|E.6dF.dG|
|00000480| 00 36 64 48 00 64 49 00 | 36 64 48 00 64 4a 00 36 |.6dH.dI.|6dH.dJ.6|
|00000490| 64 3c 00 64 4b 00 36 64 | 3c 00 64 4c 00 36 64 3c |d<.dK.6d|<.dL.6d<|
|000004a0| 00 64 4d 00 36 64 3c 00 | 64 4e 00 36 64 42 00 64 |.dM.6d<.|dN.6dB.d|
|000004b0| 4f 00 36 64 42 00 64 50 | 00 36 64 42 00 64 51 00 |O.6dB.dP|.6dB.dQ.|
|000004c0| 36 64 42 00 64 52 00 36 | 64 42 00 64 53 00 36 64 |6dB.dR.6|dB.dS.6d|
|000004d0| 42 00 64 54 00 36 64 42 | 00 64 55 00 36 64 42 00 |B.dT.6dB|.dU.6dB.|
|000004e0| 64 56 00 36 64 57 00 84 | 01 00 5a 45 00 64 58 00 |dV.6dW..|..ZE.dX.|
|000004f0| 84 00 00 5a 46 00 64 59 | 00 84 00 00 5a 47 00 64 |...ZF.dY|....ZG.d|
|00000500| 5a 00 84 00 00 5a 48 00 | 64 5b 00 64 5c 00 84 01 |Z....ZH.|d[.d\...|
|00000510| 00 5a 49 00 64 5d 00 84 | 00 00 5a 4a 00 64 5e 00 |.ZI.d]..|..ZJ.d^.|
|00000520| 84 00 00 5a 4b 00 64 5f | 00 65 26 00 66 01 00 64 |...ZK.d_|.e&.f..d|
|00000530| 60 00 84 00 00 83 00 00 | 59 5a 4c 00 65 4c 00 83 |`.......|YZL.eL..|
|00000540| 00 00 69 4d 00 5a 4e 00 | 64 5b 00 64 61 00 84 01 |..iM.ZN.|d[.da...|
|00000550| 00 5a 4f 00 64 62 00 84 | 00 00 5a 50 00 64 63 00 |.ZO.db..|..ZP.dc.|
|00000560| 84 00 00 5a 51 00 68 09 | 00 64 64 00 64 47 00 36 |...ZQ.h.|.dd.dG.6|
|00000570| 64 65 00 64 49 00 36 64 | 66 00 64 4a 00 36 64 67 |de.dI.6d|f.dJ.6dg|
|00000580| 00 64 4b 00 36 64 68 00 | 64 4c 00 36 64 69 00 64 |.dK.6dh.|dL.6di.d|
|00000590| 4d 00 36 64 6a 00 64 4e | 00 36 64 6b 00 64 4f 00 |M.6dj.dN|.6dk.dO.|
|000005a0| 36 64 6c 00 64 50 00 36 | 64 6d 00 84 01 00 5a 52 |6dl.dP.6|dm....ZR|
|000005b0| 00 65 32 00 64 6e 00 84 | 01 00 5a 53 00 65 42 00 |.e2.dn..|..ZS.eB.|
|000005c0| 64 6f 00 64 70 00 64 71 | 00 65 0d 00 64 72 00 65 |do.dp.dq|.e..dr.e|
|000005d0| 19 00 65 20 00 65 16 00 | 67 03 00 64 73 00 67 00 |..e .e..|g..ds.g.|
|000005e0| 00 64 74 00 64 75 00 64 | 76 00 64 77 00 64 78 00 |.dt.du.d|v.dw.dx.|
|000005f0| 64 3c 00 83 00 07 5a 54 | 00 65 42 00 64 6f 00 64 |d<....ZT|.eB.do.d|
|00000600| 79 00 64 71 00 65 0c 00 | 64 72 00 65 19 00 65 20 |y.dq.e..|dr.e..e |
|00000610| 00 65 16 00 65 15 00 65 | 21 00 67 05 00 64 73 00 |.e..e..e|!.g..ds.|
|00000620| 67 00 00 83 00 04 5a 55 | 00 65 42 00 64 6f 00 64 |g.....ZU|.eB.do.d|
|00000630| 79 00 64 71 00 65 0d 00 | 64 72 00 67 00 00 64 73 |y.dq.e..|dr.g..ds|
|00000640| 00 67 00 00 83 00 04 5a | 56 00 64 1a 00 64 1b 00 |.g.....Z|V.d..d..|
|00000650| 6b 57 00 5a 57 00 65 57 | 00 69 58 00 64 7a 00 65 |kW.ZW.eW|.iX.dz.e|
|00000660| 57 00 69 59 00 65 57 00 | 69 5a 00 42 83 02 00 69 |W.iY.eW.|iZ.B...i|
|00000670| 5b 00 5a 5c 00 65 57 00 | 69 58 00 64 7b 00 83 01 |[.Z\.eW.|iX.d{...|
|00000680| 00 69 5b 00 5a 5d 00 65 | 57 00 69 58 00 64 7c 00 |.i[.Z].e|W.iX.d|.|
|00000690| 83 01 00 69 5b 00 5a 5e | 00 65 57 00 69 58 00 64 |...i[.Z^|.eW.iX.d|
|000006a0| 7d 00 65 57 00 69 59 00 | 83 02 00 5a 5f 00 5b 57 |}.eW.iY.|...Z_.[W|
|000006b0| 00 64 7e 00 84 00 00 5a | 60 00 64 7f 00 84 00 00 |.d~....Z|`.d.....|
|000006c0| 5a 61 00 65 31 00 64 80 | 00 83 01 00 5a 62 00 65 |Za.e1.d.|....Zb.e|
|000006d0| 31 00 64 81 00 83 01 00 | 5a 63 00 65 31 00 64 82 |1.d.....|Zc.e1.d.|
|000006e0| 00 83 01 00 5a 64 00 65 | 31 00 64 42 00 83 01 00 |....Zd.e|1.dB....|
|000006f0| 5a 65 00 65 31 00 64 3c | 00 83 01 00 5a 66 00 65 |Ze.e1.d<|....Zf.e|
|00000700| 31 00 64 1a 00 83 01 00 | 5a 67 00 65 62 00 65 63 |1.d.....|Zg.eb.ec|
|00000710| 00 66 02 00 5a 68 00 65 | 69 00 64 83 00 6a 02 00 |.f..Zh.e|i.d..j..|
|00000720| 6f 30 00 01 64 1a 00 64 | 1b 00 6b 6a 00 5a 6a 00 |o0..d..d|..kj.Zj.|
|00000730| 64 1a 00 64 1b 00 6b 25 | 00 5a 25 00 65 6a 00 69 |d..d..k%|.Z%.ej.i|
|00000740| 6b 00 65 25 00 69 6c 00 | 65 69 00 19 83 01 00 01 |k.e%.il.|ei......|
|00000750| 6e 01 00 01 64 1b 00 53 | 28 84 00 00 00 73 c9 09 |n...d..S|(....s..|
|00000760| 00 00 0a 54 68 69 73 20 | 69 73 20 61 20 50 79 32 |...This |is a Py2|
|00000770| 2e 33 20 69 6d 70 6c 65 | 6d 65 6e 74 61 74 69 6f |.3 imple|mentatio|
|00000780| 6e 20 6f 66 20 64 65 63 | 69 6d 61 6c 20 66 6c 6f |n of dec|imal flo|
|00000790| 61 74 69 6e 67 20 70 6f | 69 6e 74 20 61 72 69 74 |ating po|int arit|
|000007a0| 68 6d 65 74 69 63 20 62 | 61 73 65 64 20 6f 6e 0a |hmetic b|ased on.|
|000007b0| 74 68 65 20 47 65 6e 65 | 72 61 6c 20 44 65 63 69 |the Gene|ral Deci|
|000007c0| 6d 61 6c 20 41 72 69 74 | 68 6d 65 74 69 63 20 53 |mal Arit|hmetic S|
|000007d0| 70 65 63 69 66 69 63 61 | 74 69 6f 6e 3a 0a 0a 20 |pecifica|tion:.. |
|000007e0| 20 20 20 77 77 77 32 2e | 68 75 72 73 6c 65 79 2e | www2.|hursley.|
|000007f0| 69 62 6d 2e 63 6f 6d 2f | 64 65 63 69 6d 61 6c 2f |ibm.com/|decimal/|
|00000800| 64 65 63 61 72 69 74 68 | 2e 68 74 6d 6c 0a 0a 61 |decarith|.html..a|
|00000810| 6e 64 20 49 45 45 45 20 | 73 74 61 6e 64 61 72 64 |nd IEEE |standard|
|00000820| 20 38 35 34 2d 31 39 38 | 37 3a 0a 0a 20 20 20 20 | 854-198|7:.. |
|00000830| 77 77 77 2e 63 73 2e 62 | 65 72 6b 65 6c 65 79 2e |www.cs.b|erkeley.|
|00000840| 65 64 75 2f 7e 65 6a 72 | 2f 70 72 6f 6a 65 63 74 |edu/~ejr|/project|
|00000850| 73 2f 37 35 34 2f 70 72 | 69 76 61 74 65 2f 64 72 |s/754/pr|ivate/dr|
|00000860| 61 66 74 73 2f 38 35 34 | 2d 31 39 38 37 2f 64 69 |afts/854|-1987/di|
|00000870| 72 2e 68 74 6d 6c 0a 0a | 44 65 63 69 6d 61 6c 20 |r.html..|Decimal |
|00000880| 66 6c 6f 61 74 69 6e 67 | 20 70 6f 69 6e 74 20 68 |floating| point h|
|00000890| 61 73 20 66 69 6e 69 74 | 65 20 70 72 65 63 69 73 |as finit|e precis|
|000008a0| 69 6f 6e 20 77 69 74 68 | 20 61 72 62 69 74 72 61 |ion with| arbitra|
|000008b0| 72 69 6c 79 20 6c 61 72 | 67 65 20 62 6f 75 6e 64 |rily lar|ge bound|
|000008c0| 73 2e 0a 0a 54 68 65 20 | 70 75 72 70 6f 73 65 20 |s...The |purpose |
|000008d0| 6f 66 20 74 68 69 73 20 | 6d 6f 64 75 6c 65 20 69 |of this |module i|
|000008e0| 73 20 74 6f 20 73 75 70 | 70 6f 72 74 20 61 72 69 |s to sup|port ari|
|000008f0| 74 68 6d 65 74 69 63 20 | 75 73 69 6e 67 20 66 61 |thmetic |using fa|
|00000900| 6d 69 6c 69 61 72 0a 22 | 73 63 68 6f 6f 6c 68 6f |miliar."|schoolho|
|00000910| 75 73 65 22 20 72 75 6c | 65 73 20 61 6e 64 20 74 |use" rul|es and t|
|00000920| 6f 20 61 76 6f 69 64 20 | 73 6f 6d 65 20 6f 66 20 |o avoid |some of |
|00000930| 74 68 65 20 74 72 69 63 | 6b 79 20 72 65 70 72 65 |the tric|ky repre|
|00000940| 73 65 6e 74 61 74 69 6f | 6e 0a 69 73 73 75 65 73 |sentatio|n.issues|
|00000950| 20 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 | associa|ted with|
|00000960| 20 62 69 6e 61 72 79 20 | 66 6c 6f 61 74 69 6e 67 | binary |floating|
|00000970| 20 70 6f 69 6e 74 2e 20 | 20 54 68 65 20 70 61 63 | point. | The pac|
|00000980| 6b 61 67 65 20 69 73 20 | 65 73 70 65 63 69 61 6c |kage is |especial|
|00000990| 6c 79 0a 75 73 65 66 75 | 6c 20 66 6f 72 20 66 69 |ly.usefu|l for fi|
|000009a0| 6e 61 6e 63 69 61 6c 20 | 61 70 70 6c 69 63 61 74 |nancial |applicat|
|000009b0| 69 6f 6e 73 20 6f 72 20 | 66 6f 72 20 63 6f 6e 74 |ions or |for cont|
|000009c0| 65 78 74 73 20 77 68 65 | 72 65 20 75 73 65 72 73 |exts whe|re users|
|000009d0| 20 68 61 76 65 0a 65 78 | 70 65 63 74 61 74 69 6f | have.ex|pectatio|
|000009e0| 6e 73 20 74 68 61 74 20 | 61 72 65 20 61 74 20 6f |ns that |are at o|
|000009f0| 64 64 73 20 77 69 74 68 | 20 62 69 6e 61 72 79 20 |dds with| binary |
|00000a00| 66 6c 6f 61 74 69 6e 67 | 20 70 6f 69 6e 74 20 28 |floating| point (|
|00000a10| 66 6f 72 20 69 6e 73 74 | 61 6e 63 65 2c 0a 69 6e |for inst|ance,.in|
|00000a20| 20 62 69 6e 61 72 79 20 | 66 6c 6f 61 74 69 6e 67 | binary |floating|
|00000a30| 20 70 6f 69 6e 74 2c 20 | 31 2e 30 30 20 25 20 30 | point, |1.00 % 0|
|00000a40| 2e 31 20 67 69 76 65 73 | 20 30 2e 30 39 39 39 39 |.1 gives| 0.09999|
|00000a50| 39 39 39 39 39 39 39 39 | 39 39 39 35 20 69 6e 73 |99999999|9995 ins|
|00000a60| 74 65 61 64 0a 6f 66 20 | 74 68 65 20 65 78 70 65 |tead.of |the expe|
|00000a70| 63 74 65 64 20 44 65 63 | 69 6d 61 6c 28 27 30 2e |cted Dec|imal('0.|
|00000a80| 30 30 27 29 20 72 65 74 | 75 72 6e 65 64 20 62 79 |00') ret|urned by|
|00000a90| 20 64 65 63 69 6d 61 6c | 20 66 6c 6f 61 74 69 6e | decimal| floatin|
|00000aa0| 67 20 70 6f 69 6e 74 29 | 2e 0a 0a 48 65 72 65 20 |g point)|...Here |
|00000ab0| 61 72 65 20 73 6f 6d 65 | 20 65 78 61 6d 70 6c 65 |are some| example|
|00000ac0| 73 20 6f 66 20 75 73 69 | 6e 67 20 74 68 65 20 64 |s of usi|ng the d|
|00000ad0| 65 63 69 6d 61 6c 20 6d | 6f 64 75 6c 65 3a 0a 0a |ecimal m|odule:..|
|00000ae0| 3e 3e 3e 20 66 72 6f 6d | 20 64 65 63 69 6d 61 6c |>>> from| decimal|
|00000af0| 20 69 6d 70 6f 72 74 20 | 2a 0a 3e 3e 3e 20 73 65 | import |*.>>> se|
|00000b00| 74 63 6f 6e 74 65 78 74 | 28 45 78 74 65 6e 64 65 |tcontext|(Extende|
|00000b10| 64 43 6f 6e 74 65 78 74 | 29 0a 3e 3e 3e 20 44 65 |dContext|).>>> De|
|00000b20| 63 69 6d 61 6c 28 30 29 | 0a 44 65 63 69 6d 61 6c |cimal(0)|.Decimal|
|00000b30| 28 27 30 27 29 0a 3e 3e | 3e 20 44 65 63 69 6d 61 |('0').>>|> Decima|
|00000b40| 6c 28 27 31 27 29 0a 44 | 65 63 69 6d 61 6c 28 27 |l('1').D|ecimal('|
|00000b50| 31 27 29 0a 3e 3e 3e 20 | 44 65 63 69 6d 61 6c 28 |1').>>> |Decimal(|
|00000b60| 27 2d 2e 30 31 32 33 27 | 29 0a 44 65 63 69 6d 61 |'-.0123'|).Decima|
|00000b70| 6c 28 27 2d 30 2e 30 31 | 32 33 27 29 0a 3e 3e 3e |l('-0.01|23').>>>|
|00000b80| 20 44 65 63 69 6d 61 6c | 28 31 32 33 34 35 36 29 | Decimal|(123456)|
|00000b90| 0a 44 65 63 69 6d 61 6c | 28 27 31 32 33 34 35 36 |.Decimal|('123456|
|00000ba0| 27 29 0a 3e 3e 3e 20 44 | 65 63 69 6d 61 6c 28 27 |').>>> D|ecimal('|
|00000bb0| 31 32 33 2e 34 35 65 31 | 32 33 34 35 36 37 38 39 |123.45e1|23456789|
|00000bc0| 30 31 32 33 34 35 36 37 | 38 39 30 27 29 0a 44 65 |01234567|890').De|
|00000bd0| 63 69 6d 61 6c 28 27 31 | 2e 32 33 34 35 45 2b 31 |cimal('1|.2345E+1|
|00000be0| 32 33 34 35 36 37 38 39 | 30 31 32 33 34 35 36 37 |23456789|01234567|
|00000bf0| 38 39 32 27 29 0a 3e 3e | 3e 20 44 65 63 69 6d 61 |892').>>|> Decima|
|00000c00| 6c 28 27 31 2e 33 33 27 | 29 20 2b 20 44 65 63 69 |l('1.33'|) + Deci|
|00000c10| 6d 61 6c 28 27 31 2e 32 | 37 27 29 0a 44 65 63 69 |mal('1.2|7').Deci|
|00000c20| 6d 61 6c 28 27 32 2e 36 | 30 27 29 0a 3e 3e 3e 20 |mal('2.6|0').>>> |
|00000c30| 44 65 63 69 6d 61 6c 28 | 27 31 32 2e 33 34 27 29 |Decimal(|'12.34')|
|00000c40| 20 2b 20 44 65 63 69 6d | 61 6c 28 27 33 2e 38 37 | + Decim|al('3.87|
|00000c50| 27 29 20 2d 20 44 65 63 | 69 6d 61 6c 28 27 31 38 |') - Dec|imal('18|
|00000c60| 2e 34 31 27 29 0a 44 65 | 63 69 6d 61 6c 28 27 2d |.41').De|cimal('-|
|00000c70| 32 2e 32 30 27 29 0a 3e | 3e 3e 20 64 69 67 20 3d |2.20').>|>> dig =|
|00000c80| 20 44 65 63 69 6d 61 6c | 28 31 29 0a 3e 3e 3e 20 | Decimal|(1).>>> |
|00000c90| 70 72 69 6e 74 20 64 69 | 67 20 2f 20 44 65 63 69 |print di|g / Deci|
|00000ca0| 6d 61 6c 28 33 29 0a 30 | 2e 33 33 33 33 33 33 33 |mal(3).0|.3333333|
|00000cb0| 33 33 0a 3e 3e 3e 20 67 | 65 74 63 6f 6e 74 65 78 |33.>>> g|etcontex|
|00000cc0| 74 28 29 2e 70 72 65 63 | 20 3d 20 31 38 0a 3e 3e |t().prec| = 18.>>|
|00000cd0| 3e 20 70 72 69 6e 74 20 | 64 69 67 20 2f 20 44 65 |> print |dig / De|
|00000ce0| 63 69 6d 61 6c 28 33 29 | 0a 30 2e 33 33 33 33 33 |cimal(3)|.0.33333|
|00000cf0| 33 33 33 33 33 33 33 33 | 33 33 33 33 33 0a 3e 3e |33333333|33333.>>|
|00000d00| 3e 20 70 72 69 6e 74 20 | 64 69 67 2e 73 71 72 74 |> print |dig.sqrt|
|00000d10| 28 29 0a 31 0a 3e 3e 3e | 20 70 72 69 6e 74 20 44 |().1.>>>| print D|
|00000d20| 65 63 69 6d 61 6c 28 33 | 29 2e 73 71 72 74 28 29 |ecimal(3|).sqrt()|
|00000d30| 0a 31 2e 37 33 32 30 35 | 30 38 30 37 35 36 38 38 |.1.73205|08075688|
|00000d40| 37 37 32 39 0a 3e 3e 3e | 20 70 72 69 6e 74 20 44 |7729.>>>| print D|
|00000d50| 65 63 69 6d 61 6c 28 33 | 29 20 2a 2a 20 31 32 33 |ecimal(3|) ** 123|
|00000d60| 0a 34 2e 38 35 31 39 32 | 37 38 30 39 37 36 38 39 |.4.85192|78097689|
|00000d70| 36 34 32 37 45 2b 35 38 | 0a 3e 3e 3e 20 69 6e 66 |6427E+58|.>>> inf|
|00000d80| 20 3d 20 44 65 63 69 6d | 61 6c 28 31 29 20 2f 20 | = Decim|al(1) / |
|00000d90| 44 65 63 69 6d 61 6c 28 | 30 29 0a 3e 3e 3e 20 70 |Decimal(|0).>>> p|
|00000da0| 72 69 6e 74 20 69 6e 66 | 0a 49 6e 66 69 6e 69 74 |rint inf|.Infinit|
|00000db0| 79 0a 3e 3e 3e 20 6e 65 | 67 69 6e 66 20 3d 20 44 |y.>>> ne|ginf = D|
|00000dc0| 65 63 69 6d 61 6c 28 2d | 31 29 20 2f 20 44 65 63 |ecimal(-|1) / Dec|
|00000dd0| 69 6d 61 6c 28 30 29 0a | 3e 3e 3e 20 70 72 69 6e |imal(0).|>>> prin|
|00000de0| 74 20 6e 65 67 69 6e 66 | 0a 2d 49 6e 66 69 6e 69 |t neginf|.-Infini|
|00000df0| 74 79 0a 3e 3e 3e 20 70 | 72 69 6e 74 20 6e 65 67 |ty.>>> p|rint neg|
|00000e00| 69 6e 66 20 2b 20 69 6e | 66 0a 4e 61 4e 0a 3e 3e |inf + in|f.NaN.>>|
|00000e10| 3e 20 70 72 69 6e 74 20 | 6e 65 67 69 6e 66 20 2a |> print |neginf *|
|00000e20| 20 69 6e 66 0a 2d 49 6e | 66 69 6e 69 74 79 0a 3e | inf.-In|finity.>|
|00000e30| 3e 3e 20 70 72 69 6e 74 | 20 64 69 67 20 2f 20 30 |>> print| dig / 0|
|00000e40| 0a 49 6e 66 69 6e 69 74 | 79 0a 3e 3e 3e 20 67 65 |.Infinit|y.>>> ge|
|00000e50| 74 63 6f 6e 74 65 78 74 | 28 29 2e 74 72 61 70 73 |tcontext|().traps|
|00000e60| 5b 44 69 76 69 73 69 6f | 6e 42 79 5a 65 72 6f 5d |[Divisio|nByZero]|
|00000e70| 20 3d 20 31 0a 3e 3e 3e | 20 70 72 69 6e 74 20 64 | = 1.>>>| print d|
|00000e80| 69 67 20 2f 20 30 0a 54 | 72 61 63 65 62 61 63 6b |ig / 0.T|raceback|
|00000e90| 20 28 6d 6f 73 74 20 72 | 65 63 65 6e 74 20 63 61 | (most r|ecent ca|
|00000ea0| 6c 6c 20 6c 61 73 74 29 | 3a 0a 20 20 2e 2e 2e 0a |ll last)|:. ....|
|00000eb0| 20 20 2e 2e 2e 0a 20 20 | 2e 2e 2e 0a 44 69 76 69 | .... |....Divi|
|00000ec0| 73 69 6f 6e 42 79 5a 65 | 72 6f 3a 20 78 20 2f 20 |sionByZe|ro: x / |
|00000ed0| 30 0a 3e 3e 3e 20 63 20 | 3d 20 43 6f 6e 74 65 78 |0.>>> c |= Contex|
|00000ee0| 74 28 29 0a 3e 3e 3e 20 | 63 2e 74 72 61 70 73 5b |t().>>> |c.traps[|
|00000ef0| 49 6e 76 61 6c 69 64 4f | 70 65 72 61 74 69 6f 6e |InvalidO|peration|
|00000f00| 5d 20 3d 20 30 0a 3e 3e | 3e 20 70 72 69 6e 74 20 |] = 0.>>|> print |
|00000f10| 63 2e 66 6c 61 67 73 5b | 49 6e 76 61 6c 69 64 4f |c.flags[|InvalidO|
|00000f20| 70 65 72 61 74 69 6f 6e | 5d 0a 30 0a 3e 3e 3e 20 |peration|].0.>>> |
|00000f30| 63 2e 64 69 76 69 64 65 | 28 44 65 63 69 6d 61 6c |c.divide|(Decimal|
|00000f40| 28 30 29 2c 20 44 65 63 | 69 6d 61 6c 28 30 29 29 |(0), Dec|imal(0))|
|00000f50| 0a 44 65 63 69 6d 61 6c | 28 27 4e 61 4e 27 29 0a |.Decimal|('NaN').|
|00000f60| 3e 3e 3e 20 63 2e 74 72 | 61 70 73 5b 49 6e 76 61 |>>> c.tr|aps[Inva|
|00000f70| 6c 69 64 4f 70 65 72 61 | 74 69 6f 6e 5d 20 3d 20 |lidOpera|tion] = |
|00000f80| 31 0a 3e 3e 3e 20 70 72 | 69 6e 74 20 63 2e 66 6c |1.>>> pr|int c.fl|
|00000f90| 61 67 73 5b 49 6e 76 61 | 6c 69 64 4f 70 65 72 61 |ags[Inva|lidOpera|
|00000fa0| 74 69 6f 6e 5d 0a 31 0a | 3e 3e 3e 20 63 2e 66 6c |tion].1.|>>> c.fl|
|00000fb0| 61 67 73 5b 49 6e 76 61 | 6c 69 64 4f 70 65 72 61 |ags[Inva|lidOpera|
|00000fc0| 74 69 6f 6e 5d 20 3d 20 | 30 0a 3e 3e 3e 20 70 72 |tion] = |0.>>> pr|
|00000fd0| 69 6e 74 20 63 2e 66 6c | 61 67 73 5b 49 6e 76 61 |int c.fl|ags[Inva|
|00000fe0| 6c 69 64 4f 70 65 72 61 | 74 69 6f 6e 5d 0a 30 0a |lidOpera|tion].0.|
|00000ff0| 3e 3e 3e 20 70 72 69 6e | 74 20 63 2e 64 69 76 69 |>>> prin|t c.divi|
|00001000| 64 65 28 44 65 63 69 6d | 61 6c 28 30 29 2c 20 44 |de(Decim|al(0), D|
|00001010| 65 63 69 6d 61 6c 28 30 | 29 29 0a 54 72 61 63 65 |ecimal(0|)).Trace|
|00001020| 62 61 63 6b 20 28 6d 6f | 73 74 20 72 65 63 65 6e |back (mo|st recen|
|00001030| 74 20 63 61 6c 6c 20 6c | 61 73 74 29 3a 0a 20 20 |t call l|ast):. |
|00001040| 2e 2e 2e 0a 20 20 2e 2e | 2e 0a 20 20 2e 2e 2e 0a |.... ..|.. ....|
|00001050| 49 6e 76 61 6c 69 64 4f | 70 65 72 61 74 69 6f 6e |InvalidO|peration|
|00001060| 3a 20 30 20 2f 20 30 0a | 3e 3e 3e 20 70 72 69 6e |: 0 / 0.|>>> prin|
|00001070| 74 20 63 2e 66 6c 61 67 | 73 5b 49 6e 76 61 6c 69 |t c.flag|s[Invali|
|00001080| 64 4f 70 65 72 61 74 69 | 6f 6e 5d 0a 31 0a 3e 3e |dOperati|on].1.>>|
|00001090| 3e 20 63 2e 66 6c 61 67 | 73 5b 49 6e 76 61 6c 69 |> c.flag|s[Invali|
|000010a0| 64 4f 70 65 72 61 74 69 | 6f 6e 5d 20 3d 20 30 0a |dOperati|on] = 0.|
|000010b0| 3e 3e 3e 20 63 2e 74 72 | 61 70 73 5b 49 6e 76 61 |>>> c.tr|aps[Inva|
|000010c0| 6c 69 64 4f 70 65 72 61 | 74 69 6f 6e 5d 20 3d 20 |lidOpera|tion] = |
|000010d0| 30 0a 3e 3e 3e 20 70 72 | 69 6e 74 20 63 2e 64 69 |0.>>> pr|int c.di|
|000010e0| 76 69 64 65 28 44 65 63 | 69 6d 61 6c 28 30 29 2c |vide(Dec|imal(0),|
|000010f0| 20 44 65 63 69 6d 61 6c | 28 30 29 29 0a 4e 61 4e | Decimal|(0)).NaN|
|00001100| 0a 3e 3e 3e 20 70 72 69 | 6e 74 20 63 2e 66 6c 61 |.>>> pri|nt c.fla|
|00001110| 67 73 5b 49 6e 76 61 6c | 69 64 4f 70 65 72 61 74 |gs[Inval|idOperat|
|00001120| 69 6f 6e 5d 0a 31 0a 3e | 3e 3e 0a 74 07 00 00 00 |ion].1.>|>>.t....|
|00001130| 44 65 63 69 6d 61 6c 74 | 07 00 00 00 43 6f 6e 74 |Decimalt|....Cont|
|00001140| 65 78 74 74 0e 00 00 00 | 44 65 66 61 75 6c 74 43 |extt....|DefaultC|
|00001150| 6f 6e 74 65 78 74 74 0c | 00 00 00 42 61 73 69 63 |ontextt.|...Basic|
|00001160| 43 6f 6e 74 65 78 74 74 | 0f 00 00 00 45 78 74 65 |Contextt|....Exte|
|00001170| 6e 64 65 64 43 6f 6e 74 | 65 78 74 74 10 00 00 00 |ndedCont|extt....|
|00001180| 44 65 63 69 6d 61 6c 45 | 78 63 65 70 74 69 6f 6e |DecimalE|xception|
|00001190| 74 07 00 00 00 43 6c 61 | 6d 70 65 64 74 10 00 00 |t....Cla|mpedt...|
|000011a0| 00 49 6e 76 61 6c 69 64 | 4f 70 65 72 61 74 69 6f |.Invalid|Operatio|
|000011b0| 6e 74 0e 00 00 00 44 69 | 76 69 73 69 6f 6e 42 79 |nt....Di|visionBy|
|000011c0| 5a 65 72 6f 74 07 00 00 | 00 49 6e 65 78 61 63 74 |Zerot...|.Inexact|
|000011d0| 74 07 00 00 00 52 6f 75 | 6e 64 65 64 74 09 00 00 |t....Rou|ndedt...|
|000011e0| 00 53 75 62 6e 6f 72 6d | 61 6c 74 08 00 00 00 4f |.Subnorm|alt....O|
|000011f0| 76 65 72 66 6c 6f 77 74 | 09 00 00 00 55 6e 64 65 |verflowt|....Unde|
|00001200| 72 66 6c 6f 77 74 0a 00 | 00 00 52 4f 55 4e 44 5f |rflowt..|..ROUND_|
|00001210| 44 4f 57 4e 74 0d 00 00 | 00 52 4f 55 4e 44 5f 48 |DOWNt...|.ROUND_H|
|00001220| 41 4c 46 5f 55 50 74 0f | 00 00 00 52 4f 55 4e 44 |ALF_UPt.|...ROUND|
|00001230| 5f 48 41 4c 46 5f 45 56 | 45 4e 74 0d 00 00 00 52 |_HALF_EV|ENt....R|
|00001240| 4f 55 4e 44 5f 43 45 49 | 4c 49 4e 47 74 0b 00 00 |OUND_CEI|LINGt...|
|00001250| 00 52 4f 55 4e 44 5f 46 | 4c 4f 4f 52 74 08 00 00 |.ROUND_F|LOORt...|
|00001260| 00 52 4f 55 4e 44 5f 55 | 50 74 0f 00 00 00 52 4f |.ROUND_U|Pt....RO|
|00001270| 55 4e 44 5f 48 41 4c 46 | 5f 44 4f 57 4e 74 0a 00 |UND_HALF|_DOWNt..|
|00001280| 00 00 52 4f 55 4e 44 5f | 30 35 55 50 74 0a 00 00 |..ROUND_|05UPt...|
|00001290| 00 73 65 74 63 6f 6e 74 | 65 78 74 74 0a 00 00 00 |.setcont|extt....|
|000012a0| 67 65 74 63 6f 6e 74 65 | 78 74 74 0c 00 00 00 6c |getconte|xtt....l|
|000012b0| 6f 63 61 6c 63 6f 6e 74 | 65 78 74 69 ff ff ff ff |ocalcont|exti....|
|000012c0| 4e 28 01 00 00 00 74 0a | 00 00 00 6e 61 6d 65 64 |N(....t.|...named|
|000012d0| 74 75 70 6c 65 74 0c 00 | 00 00 44 65 63 69 6d 61 |tuplet..|..Decima|
|000012e0| 6c 54 75 70 6c 65 73 14 | 00 00 00 73 69 67 6e 20 |lTuples.|...sign |
|000012f0| 64 69 67 69 74 73 20 65 | 78 70 6f 6e 65 6e 74 63 |digits e|xponentc|
|00001300| 00 00 00 00 01 00 00 00 | 01 00 00 00 47 00 00 00 |........|....G...|
|00001310| 73 04 00 00 00 7c 00 00 | 53 28 00 00 00 00 28 00 |s....|..|S(....(.|
|00001320| 00 00 00 28 01 00 00 00 | 74 04 00 00 00 61 72 67 |...(....|t....arg|
|00001330| 73 28 00 00 00 00 28 00 | 00 00 00 73 1d 00 00 00 |s(....(.|...s....|
|00001340| 2f 75 73 72 2f 6c 69 62 | 2f 70 79 74 68 6f 6e 32 |/usr/lib|/python2|
|00001350| 2e 36 2f 64 65 63 69 6d | 61 6c 2e 70 79 74 08 00 |.6/decim|al.pyt..|
|00001360| 00 00 3c 6c 61 6d 62 64 | 61 3e 90 00 00 00 73 00 |..<lambd|a>....s.|
|00001370| 00 00 00 63 00 00 00 00 | 00 00 00 00 01 00 00 00 |...c....|........|
|00001380| 42 00 00 00 73 17 00 00 | 00 65 00 00 5a 01 00 64 |B...s...|.e..Z..d|
|00001390| 00 00 5a 02 00 64 01 00 | 84 00 00 5a 03 00 52 53 |..Z..d..|...Z..RS|
|000013a0| 28 02 00 00 00 73 2d 03 | 00 00 42 61 73 65 20 65 |(....s-.|..Base e|
|000013b0| 78 63 65 70 74 69 6f 6e | 20 63 6c 61 73 73 2e 0a |xception| class..|
|000013c0| 0a 20 20 20 20 55 73 65 | 64 20 65 78 63 65 70 74 |. Use|d except|
|000013d0| 69 6f 6e 73 20 64 65 72 | 69 76 65 20 66 72 6f 6d |ions der|ive from|
|000013e0| 20 74 68 69 73 2e 0a 20 | 20 20 20 49 66 20 61 6e | this.. | If an|
|000013f0| 20 65 78 63 65 70 74 69 | 6f 6e 20 64 65 72 69 76 | excepti|on deriv|
|00001400| 65 73 20 66 72 6f 6d 20 | 61 6e 6f 74 68 65 72 20 |es from |another |
|00001410| 65 78 63 65 70 74 69 6f | 6e 20 62 65 73 69 64 65 |exceptio|n beside|
|00001420| 73 20 74 68 69 73 20 28 | 73 75 63 68 20 61 73 0a |s this (|such as.|
|00001430| 20 20 20 20 55 6e 64 65 | 72 66 6c 6f 77 20 28 49 | Unde|rflow (I|
|00001440| 6e 65 78 61 63 74 2c 20 | 52 6f 75 6e 64 65 64 2c |nexact, |Rounded,|
|00001450| 20 53 75 62 6e 6f 72 6d | 61 6c 29 20 74 68 61 74 | Subnorm|al) that|
|00001460| 20 69 6e 64 69 63 61 74 | 65 73 20 74 68 61 74 20 | indicat|es that |
|00001470| 69 74 20 69 73 20 6f 6e | 6c 79 0a 20 20 20 20 63 |it is on|ly. c|
|00001480| 61 6c 6c 65 64 20 69 66 | 20 74 68 65 20 6f 74 68 |alled if| the oth|
|00001490| 65 72 73 20 61 72 65 20 | 70 72 65 73 65 6e 74 2e |ers are |present.|
|000014a0| 20 20 54 68 69 73 20 69 | 73 6e 27 74 20 61 63 74 | This i|sn't act|
|000014b0| 75 61 6c 6c 79 20 75 73 | 65 64 20 66 6f 72 0a 20 |ually us|ed for. |
|000014c0| 20 20 20 61 6e 79 74 68 | 69 6e 67 2c 20 74 68 6f | anyth|ing, tho|
|000014d0| 75 67 68 2e 0a 0a 20 20 | 20 20 68 61 6e 64 6c 65 |ugh... | handle|
|000014e0| 20 20 2d 2d 20 43 61 6c | 6c 65 64 20 77 68 65 6e | -- Cal|led when|
|000014f0| 20 63 6f 6e 74 65 78 74 | 2e 5f 72 61 69 73 65 5f | context|._raise_|
|00001500| 65 72 72 6f 72 20 69 73 | 20 63 61 6c 6c 65 64 20 |error is| called |
|00001510| 61 6e 64 20 74 68 65 0a | 20 20 20 20 20 20 20 20 |and the.| |
|00001520| 20 20 20 20 20 20 20 74 | 72 61 70 5f 65 6e 61 62 | t|rap_enab|
|00001530| 6c 65 72 20 69 73 20 73 | 65 74 2e 20 20 46 69 72 |ler is s|et. Fir|
|00001540| 73 74 20 61 72 67 75 6d | 65 6e 74 20 69 73 20 73 |st argum|ent is s|
|00001550| 65 6c 66 2c 20 73 65 63 | 6f 6e 64 20 69 73 20 74 |elf, sec|ond is t|
|00001560| 68 65 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |he. | |
|00001570| 20 20 63 6f 6e 74 65 78 | 74 2e 20 20 4d 6f 72 65 | contex|t. More|
|00001580| 20 61 72 67 75 6d 65 6e | 74 73 20 63 61 6e 20 62 | argumen|ts can b|
|00001590| 65 20 67 69 76 65 6e 2c | 20 74 68 6f 73 65 20 62 |e given,| those b|
|000015a0| 65 69 6e 67 20 61 66 74 | 65 72 0a 20 20 20 20 20 |eing aft|er. |
|000015b0| 20 20 20 20 20 20 20 20 | 20 20 74 68 65 20 65 78 | | the ex|
|000015c0| 70 6c 61 6e 61 74 69 6f | 6e 20 69 6e 20 5f 72 61 |planatio|n in _ra|
|000015d0| 69 73 65 5f 65 72 72 6f | 72 20 28 46 6f 72 20 65 |ise_erro|r (For e|
|000015e0| 78 61 6d 70 6c 65 2c 0a | 20 20 20 20 20 20 20 20 |xample,.| |
|000015f0| 20 20 20 20 20 20 20 63 | 6f 6e 74 65 78 74 2e 5f | c|ontext._|
|00001600| 72 61 69 73 65 5f 65 72 | 72 6f 72 28 4e 65 77 45 |raise_er|ror(NewE|
|00001610| 72 72 6f 72 2c 20 27 28 | 2d 78 29 21 27 2c 20 73 |rror, '(|-x)!', s|
|00001620| 65 6c 66 2e 5f 73 69 67 | 6e 29 20 77 6f 75 6c 64 |elf._sig|n) would|
|00001630| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001640| 63 61 6c 6c 20 4e 65 77 | 45 72 72 6f 72 28 29 2e |call New|Error().|
|00001650| 68 61 6e 64 6c 65 28 63 | 6f 6e 74 65 78 74 2c 20 |handle(c|ontext, |
|00001660| 73 65 6c 66 2e 5f 73 69 | 67 6e 29 2e 29 0a 0a 20 |self._si|gn).).. |
|00001670| 20 20 20 54 6f 20 64 65 | 66 69 6e 65 20 61 20 6e | To de|fine a n|
|00001680| 65 77 20 65 78 63 65 70 | 74 69 6f 6e 2c 20 69 74 |ew excep|tion, it|
|00001690| 20 73 68 6f 75 6c 64 20 | 62 65 20 73 75 66 66 69 | should |be suffi|
|000016a0| 63 69 65 6e 74 20 74 6f | 20 68 61 76 65 20 69 74 |cient to| have it|
|000016b0| 20 64 65 72 69 76 65 0a | 20 20 20 20 66 72 6f 6d | derive.| from|
|000016c0| 20 44 65 63 69 6d 61 6c | 45 78 63 65 70 74 69 6f | Decimal|Exceptio|
|000016d0| 6e 2e 0a 20 20 20 20 63 | 02 00 00 00 03 00 00 00 |n.. c|........|
|000016e0| 01 00 00 00 47 00 00 00 | 73 04 00 00 00 64 00 00 |....G...|s....d..|
|000016f0| 53 28 01 00 00 00 4e 28 | 00 00 00 00 28 03 00 00 |S(....N(|....(...|
|00001700| 00 74 04 00 00 00 73 65 | 6c 66 74 07 00 00 00 63 |.t....se|lft....c|
|00001710| 6f 6e 74 65 78 74 52 1b | 00 00 00 28 00 00 00 00 |ontextR.|...(....|
|00001720| 28 00 00 00 00 73 1d 00 | 00 00 2f 75 73 72 2f 6c |(....s..|../usr/l|
|00001730| 69 62 2f 70 79 74 68 6f | 6e 32 2e 36 2f 64 65 63 |ib/pytho|n2.6/dec|
|00001740| 69 6d 61 6c 2e 70 79 74 | 06 00 00 00 68 61 6e 64 |imal.pyt|....hand|
|00001750| 6c 65 b1 00 00 00 73 02 | 00 00 00 00 01 28 04 00 |le....s.|.....(..|
|00001760| 00 00 74 08 00 00 00 5f | 5f 6e 61 6d 65 5f 5f 74 |..t...._|_name__t|
|00001770| 0a 00 00 00 5f 5f 6d 6f | 64 75 6c 65 5f 5f 74 07 |....__mo|dule__t.|
|00001780| 00 00 00 5f 5f 64 6f 63 | 5f 5f 52 1f 00 00 00 28 |...__doc|__R....(|
|00001790| 00 00 00 00 28 00 00 00 | 00 28 00 00 00 00 73 1d |....(...|.(....s.|
|000017a0| 00 00 00 2f 75 73 72 2f | 6c 69 62 2f 70 79 74 68 |.../usr/|lib/pyth|
|000017b0| 6f 6e 32 2e 36 2f 64 65 | 63 69 6d 61 6c 2e 70 79 |on2.6/de|cimal.py|
|000017c0| 52 05 00 00 00 9e 00 00 | 00 73 04 00 00 00 06 12 |R.......|.s......|
|000017d0| 06 01 63 00 00 00 00 00 | 00 00 00 01 00 00 00 42 |..c.....|.......B|
|000017e0| 00 00 00 73 0e 00 00 00 | 65 00 00 5a 01 00 64 00 |...s....|e..Z..d.|
|000017f0| 00 5a 02 00 52 53 28 01 | 00 00 00 73 29 02 00 00 |.Z..RS(.|...s)...|
|00001800| 45 78 70 6f 6e 65 6e 74 | 20 6f 66 20 61 20 30 20 |Exponent| of a 0 |
|00001810| 63 68 61 6e 67 65 64 20 | 74 6f 20 66 69 74 20 62 |changed |to fit b|
|00001820| 6f 75 6e 64 73 2e 0a 0a | 20 20 20 20 54 68 69 73 |ounds...| This|
|00001830| 20 6f 63 63 75 72 73 20 | 61 6e 64 20 73 69 67 6e | occurs |and sign|
|00001840| 61 6c 73 20 63 6c 61 6d | 70 65 64 20 69 66 20 74 |als clam|ped if t|
|00001850| 68 65 20 65 78 70 6f 6e | 65 6e 74 20 6f 66 20 61 |he expon|ent of a|
|00001860| 20 72 65 73 75 6c 74 20 | 68 61 73 20 62 65 65 6e | result |has been|
|00001870| 0a 20 20 20 20 61 6c 74 | 65 72 65 64 20 69 6e 20 |. alt|ered in |
|00001880| 6f 72 64 65 72 20 74 6f | 20 66 69 74 20 74 68 65 |order to| fit the|
|00001890| 20 63 6f 6e 73 74 72 61 | 69 6e 74 73 20 6f 66 20 | constra|ints of |
|000018a0| 61 20 73 70 65 63 69 66 | 69 63 20 63 6f 6e 63 72 |a specif|ic concr|
|000018b0| 65 74 65 0a 20 20 20 20 | 72 65 70 72 65 73 65 6e |ete. |represen|
|000018c0| 74 61 74 69 6f 6e 2e 20 | 20 54 68 69 73 20 6d 61 |tation. | This ma|
|000018d0| 79 20 6f 63 63 75 72 20 | 77 68 65 6e 20 74 68 65 |y occur |when the|
|000018e0| 20 65 78 70 6f 6e 65 6e | 74 20 6f 66 20 61 20 7a | exponen|t of a z|
|000018f0| 65 72 6f 20 72 65 73 75 | 6c 74 20 77 6f 75 6c 64 |ero resu|lt would|
|00001900| 0a 20 20 20 20 62 65 20 | 6f 75 74 73 69 64 65 20 |. be |outside |
|00001910| 74 68 65 20 62 6f 75 6e | 64 73 20 6f 66 20 61 20 |the boun|ds of a |
|00001920| 72 65 70 72 65 73 65 6e | 74 61 74 69 6f 6e 2c 20 |represen|tation, |
|00001930| 6f 72 20 77 68 65 6e 20 | 61 20 6c 61 72 67 65 20 |or when |a large |
|00001940| 6e 6f 72 6d 61 6c 0a 20 | 20 20 20 6e 75 6d 62 65 |normal. | numbe|
|00001950| 72 20 77 6f 75 6c 64 20 | 68 61 76 65 20 61 6e 20 |r would |have an |
|00001960| 65 6e 63 6f 64 65 64 20 | 65 78 70 6f 6e 65 6e 74 |encoded |exponent|
|00001970| 20 74 68 61 74 20 63 61 | 6e 6e 6f 74 20 62 65 20 | that ca|nnot be |
|00001980| 72 65 70 72 65 73 65 6e | 74 65 64 2e 20 20 49 6e |represen|ted. In|
|00001990| 0a 20 20 20 20 74 68 69 | 73 20 6c 61 74 74 65 72 |. thi|s latter|
|000019a0| 20 63 61 73 65 2c 20 74 | 68 65 20 65 78 70 6f 6e | case, t|he expon|
|000019b0| 65 6e 74 20 69 73 20 72 | 65 64 75 63 65 64 20 74 |ent is r|educed t|
|000019c0| 6f 20 66 69 74 20 61 6e | 64 20 74 68 65 20 63 6f |o fit an|d the co|
|000019d0| 72 72 65 73 70 6f 6e 64 | 69 6e 67 0a 20 20 20 20 |rrespond|ing. |
|000019e0| 6e 75 6d 62 65 72 20 6f | 66 20 7a 65 72 6f 20 64 |number o|f zero d|
|000019f0| 69 67 69 74 73 20 61 72 | 65 20 61 70 70 65 6e 64 |igits ar|e append|
|00001a00| 65 64 20 74 6f 20 74 68 | 65 20 63 6f 65 66 66 69 |ed to th|e coeffi|
|00001a10| 63 69 65 6e 74 20 28 22 | 66 6f 6c 64 2d 64 6f 77 |cient ("|fold-dow|
|00001a20| 6e 22 29 2e 0a 20 20 20 | 20 28 03 00 00 00 52 20 |n").. | (....R |
|00001a30| 00 00 00 52 21 00 00 00 | 52 22 00 00 00 28 00 00 |...R!...|R"...(..|
|00001a40| 00 00 28 00 00 00 00 28 | 00 00 00 00 73 1d 00 00 |..(....(|....s...|
|00001a50| 00 2f 75 73 72 2f 6c 69 | 62 2f 70 79 74 68 6f 6e |./usr/li|b/python|
|00001a60| 32 2e 36 2f 64 65 63 69 | 6d 61 6c 2e 70 79 52 06 |2.6/deci|mal.pyR.|
|00001a70| 00 00 00 b5 00 00 00 73 | 02 00 00 00 06 0a 63 00 |.......s|......c.|
|00001a80| 00 00 00 00 00 00 00 01 | 00 00 00 42 00 00 00 73 |........|...B...s|
|00001a90| 17 00 00 00 65 00 00 5a | 01 00 64 00 00 5a 02 00 |....e..Z|..d..Z..|
|00001aa0| 64 01 00 84 00 00 5a 03 | 00 52 53 28 02 00 00 00 |d.....Z.|.RS(....|
|00001ab0| 73 30 02 00 00 41 6e 20 | 69 6e 76 61 6c 69 64 20 |s0...An |invalid |
|00001ac0| 6f 70 65 72 61 74 69 6f | 6e 20 77 61 73 20 70 65 |operatio|n was pe|
|00001ad0| 72 66 6f 72 6d 65 64 2e | 0a 0a 20 20 20 20 56 61 |rformed.|.. Va|
|00001ae0| 72 69 6f 75 73 20 62 61 | 64 20 74 68 69 6e 67 73 |rious ba|d things|
|00001af0| 20 63 61 75 73 65 20 74 | 68 69 73 3a 0a 0a 20 20 | cause t|his:.. |
|00001b00| 20 20 53 6f 6d 65 74 68 | 69 6e 67 20 63 72 65 61 | Someth|ing crea|
|00001b10| 74 65 73 20 61 20 73 69 | 67 6e 61 6c 69 6e 67 20 |tes a si|gnaling |
|00001b20| 4e 61 4e 0a 20 20 20 20 | 2d 49 4e 46 20 2b 20 49 |NaN. |-INF + I|
|00001b30| 4e 46 0a 20 20 20 20 30 | 20 2a 20 28 2b 2d 29 49 |NF. 0| * (+-)I|
|00001b40| 4e 46 0a 20 20 20 20 28 | 2b 2d 29 49 4e 46 20 2f |NF. (|+-)INF /|
|00001b50| 20 28 2b 2d 29 49 4e 46 | 0a 20 20 20 20 78 20 25 | (+-)INF|. x %|
|00001b60| 20 30 0a 20 20 20 20 28 | 2b 2d 29 49 4e 46 20 25 | 0. (|+-)INF %|
|00001b70| 20 78 0a 20 20 20 20 78 | 2e 5f 72 65 73 63 61 6c | x. x|._rescal|
|00001b80| 65 28 20 6e 6f 6e 2d 69 | 6e 74 65 67 65 72 20 29 |e( non-i|nteger )|
|00001b90| 0a 20 20 20 20 73 71 72 | 74 28 2d 78 29 20 2c 20 |. sqr|t(-x) , |
|00001ba0| 78 20 3e 20 30 0a 20 20 | 20 20 30 20 2a 2a 20 30 |x > 0. | 0 ** 0|
|00001bb0| 0a 20 20 20 20 78 20 2a | 2a 20 28 6e 6f 6e 2d 69 |. x *|* (non-i|
|00001bc0| 6e 74 65 67 65 72 29 0a | 20 20 20 20 78 20 2a 2a |nteger).| x **|
|00001bd0| 20 28 2b 2d 29 49 4e 46 | 0a 20 20 20 20 41 6e 20 | (+-)INF|. An |
|00001be0| 6f 70 65 72 61 6e 64 20 | 69 73 20 69 6e 76 61 6c |operand |is inval|
|00001bf0| 69 64 0a 0a 20 20 20 20 | 54 68 65 20 72 65 73 75 |id.. |The resu|
|00001c00| 6c 74 20 6f 66 20 74 68 | 65 20 6f 70 65 72 61 74 |lt of th|e operat|
|00001c10| 69 6f 6e 20 61 66 74 65 | 72 20 74 68 65 73 65 20 |ion afte|r these |
|00001c20| 69 73 20 61 20 71 75 69 | 65 74 20 70 6f 73 69 74 |is a qui|et posit|
|00001c30| 69 76 65 20 4e 61 4e 2c | 0a 20 20 20 20 65 78 63 |ive NaN,|. exc|
|00001c40| 65 70 74 20 77 68 65 6e | 20 74 68 65 20 63 61 75 |ept when| the cau|
|00001c50| 73 65 20 69 73 20 61 20 | 73 69 67 6e 61 6c 69 6e |se is a |signalin|
|00001c60| 67 20 4e 61 4e 2c 20 69 | 6e 20 77 68 69 63 68 20 |g NaN, i|n which |
|00001c70| 63 61 73 65 20 74 68 65 | 20 72 65 73 75 6c 74 20 |case the| result |
|00001c80| 69 73 0a 20 20 20 20 61 | 6c 73 6f 20 61 20 71 75 |is. a|lso a qu|
|00001c90| 69 65 74 20 4e 61 4e 2c | 20 62 75 74 20 77 69 74 |iet NaN,| but wit|
|00001ca0| 68 20 74 68 65 20 6f 72 | 69 67 69 6e 61 6c 20 73 |h the or|iginal s|
|00001cb0| 69 67 6e 2c 20 61 6e 64 | 20 61 6e 20 6f 70 74 69 |ign, and| an opti|
|00001cc0| 6f 6e 61 6c 0a 20 20 20 | 20 64 69 61 67 6e 6f 73 |onal. | diagnos|
|00001cd0| 74 69 63 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 2e |tic info|rmation.|
|00001ce0| 0a 20 20 20 20 63 02 00 | 00 00 04 00 00 00 05 00 |. c..|........|
|00001cf0| 00 00 47 00 00 00 73 3c | 00 00 00 7c 02 00 6f 31 |..G...s<|...|..o1|
|00001d00| 00 01 74 00 00 7c 02 00 | 64 01 00 19 69 01 00 7c |..t..|..|d...i..||
|00001d10| 02 00 64 01 00 19 69 02 | 00 64 02 00 74 03 00 83 |..d...i.|.d..t...|
|00001d20| 04 00 7d 03 00 7c 03 00 | 69 04 00 7c 01 00 83 01 |..}..|..|i..|....|
|00001d30| 00 53 01 74 05 00 53 28 | 03 00 00 00 4e 69 00 00 |.S.t..S(|....Ni..|
|00001d40| 00 00 74 01 00 00 00 6e | 28 06 00 00 00 74 10 00 |..t....n|(....t..|
|00001d50| 00 00 5f 64 65 63 5f 66 | 72 6f 6d 5f 74 72 69 70 |.._dec_f|rom_trip|
|00001d60| 6c 65 74 05 00 00 00 5f | 73 69 67 6e 74 04 00 00 |let...._|signt...|
|00001d70| 00 5f 69 6e 74 74 04 00 | 00 00 54 72 75 65 74 08 |._intt..|..Truet.|
|00001d80| 00 00 00 5f 66 69 78 5f | 6e 61 6e 74 04 00 00 00 |..._fix_|nant....|
|00001d90| 5f 4e 61 4e 28 04 00 00 | 00 52 1d 00 00 00 52 1e |_NaN(...|.R....R.|
|00001da0| 00 00 00 52 1b 00 00 00 | 74 03 00 00 00 61 6e 73 |...R....|t....ans|
|00001db0| 28 00 00 00 00 28 00 00 | 00 00 73 1d 00 00 00 2f |(....(..|..s..../|
|00001dc0| 75 73 72 2f 6c 69 62 2f | 70 79 74 68 6f 6e 32 2e |usr/lib/|python2.|
|00001dd0| 36 2f 64 65 63 69 6d 61 | 6c 2e 70 79 52 1f 00 00 |6/decima|l.pyR...|
|00001de0| 00 d8 00 00 00 73 08 00 | 00 00 00 01 07 01 23 01 |.....s..|......#.|
|00001df0| 0e 01 28 04 00 00 00 52 | 20 00 00 00 52 21 00 00 |..(....R| ...R!..|
|00001e00| 00 52 22 00 00 00 52 1f | 00 00 00 28 00 00 00 00 |.R"...R.|...(....|
|00001e10| 28 00 00 00 00 28 00 00 | 00 00 73 1d 00 00 00 2f |(....(..|..s..../|
|00001e20| 75 73 72 2f 6c 69 62 2f | 70 79 74 68 6f 6e 32 2e |usr/lib/|python2.|
|00001e30| 36 2f 64 65 63 69 6d 61 | 6c 2e 70 79 52 07 00 00 |6/decima|l.pyR...|
|00001e40| 00 c1 00 00 00 73 04 00 | 00 00 06 16 06 01 74 10 |.....s..|......t.|
|00001e50| 00 00 00 43 6f 6e 76 65 | 72 73 69 6f 6e 53 79 6e |...Conve|rsionSyn|
|00001e60| 74 61 78 63 00 00 00 00 | 00 00 00 00 01 00 00 00 |taxc....|........|
|00001e70| 42 00 00 00 73 17 00 00 | 00 65 00 00 5a 01 00 64 |B...s...|.e..Z..d|
|00001e80| 00 00 5a 02 00 64 01 00 | 84 00 00 5a 03 00 52 53 |..Z..d..|...Z..RS|
|00001e90| 28 02 00 00 00 73 dd 00 | 00 00 54 72 79 69 6e 67 |(....s..|..Trying|
|00001ea0| 20 74 6f 20 63 6f 6e 76 | 65 72 74 20 62 61 64 6c | to conv|ert badl|
|00001eb0| 79 20 66 6f 72 6d 65 64 | 20 73 74 72 69 6e 67 2e |y formed| string.|
|00001ec0| 0a 0a 20 20 20 20 54 68 | 69 73 20 6f 63 63 75 72 |.. Th|is occur|
|00001ed0| 73 20 61 6e 64 20 73 69 | 67 6e 61 6c 73 20 69 6e |s and si|gnals in|
|00001ee0| 76 61 6c 69 64 2d 6f 70 | 65 72 61 74 69 6f 6e 20 |valid-op|eration |
|00001ef0| 69 66 20 61 6e 20 73 74 | 72 69 6e 67 20 69 73 20 |if an st|ring is |
|00001f00| 62 65 69 6e 67 0a 20 20 | 20 20 63 6f 6e 76 65 72 |being. | conver|
|00001f10| 74 65 64 20 74 6f 20 61 | 20 6e 75 6d 62 65 72 20 |ted to a| number |
|00001f20| 61 6e 64 20 69 74 20 64 | 6f 65 73 20 6e 6f 74 20 |and it d|oes not |
|00001f30| 63 6f 6e 66 6f 72 6d 20 | 74 6f 20 74 68 65 20 6e |conform |to the n|
|00001f40| 75 6d 65 72 69 63 20 73 | 74 72 69 6e 67 0a 20 20 |umeric s|tring. |
|00001f50| 20 20 73 79 6e 74 61 78 | 2e 20 20 54 68 65 20 72 | syntax|. The r|
|00001f60| 65 73 75 6c 74 20 69 73 | 20 5b 30 2c 71 4e 61 4e |esult is| [0,qNaN|
|00001f70| 5d 2e 0a 20 20 20 20 63 | 02 00 00 00 03 00 00 00 |].. c|........|
|00001f80| 01 00 00 00 47 00 00 00 | 73 04 00 00 00 74 00 00 |....G...|s....t..|
|00001f90| 53 28 01 00 00 00 4e 28 | 01 00 00 00 52 29 00 00 |S(....N(|....R)..|
|00001fa0| 00 28 03 00 00 00 52 1d | 00 00 00 52 1e 00 00 00 |.(....R.|...R....|
|00001fb0| 52 1b 00 00 00 28 00 00 | 00 00 28 00 00 00 00 73 |R....(..|..(....s|
|00001fc0| 1d 00 00 00 2f 75 73 72 | 2f 6c 69 62 2f 70 79 74 |..../usr|/lib/pyt|
|00001fd0| 68 6f 6e 32 2e 36 2f 64 | 65 63 69 6d 61 6c 2e 70 |hon2.6/d|ecimal.p|
|00001fe0| 79 52 1f 00 00 00 e5 00 | 00 00 73 02 00 00 00 00 |yR......|..s.....|
|00001ff0| 01 28 04 00 00 00 52 20 | 00 00 00 52 21 00 00 00 |.(....R |...R!...|
|00002000| 52 22 00 00 00 52 1f 00 | 00 00 28 00 00 00 00 28 |R"...R..|..(....(|
|00002010| 00 00 00 00 28 00 00 00 | 00 73 1d 00 00 00 2f 75 |....(...|.s..../u|
|00002020| 73 72 2f 6c 69 62 2f 70 | 79 74 68 6f 6e 32 2e 36 |sr/lib/p|ython2.6|
|00002030| 2f 64 65 63 69 6d 61 6c | 2e 70 79 52 2b 00 00 00 |/decimal|.pyR+...|
|00002040| de 00 00 00 73 04 00 00 | 00 06 06 06 01 63 00 00 |....s...|.....c..|
|00002050| 00 00 00 00 00 00 01 00 | 00 00 42 00 00 00 73 17 |........|..B...s.|
|00002060| 00 00 00 65 00 00 5a 01 | 00 64 00 00 5a 02 00 64 |...e..Z.|.d..Z..d|
|00002070| 01 00 84 00 00 5a 03 00 | 52 53 28 02 00 00 00 73 |.....Z..|RS(....s|
|00002080| b2 01 00 00 44 69 76 69 | 73 69 6f 6e 20 62 79 20 |....Divi|sion by |
|00002090| 30 2e 0a 0a 20 20 20 20 | 54 68 69 73 20 6f 63 63 |0... |This occ|
|000020a0| 75 72 73 20 61 6e 64 20 | 73 69 67 6e 61 6c 73 20 |urs and |signals |
|000020b0| 64 69 76 69 73 69 6f 6e | 2d 62 79 2d 7a 65 72 6f |division|-by-zero|
|000020c0| 20 69 66 20 64 69 76 69 | 73 69 6f 6e 20 6f 66 20 | if divi|sion of |
|000020d0| 61 20 66 69 6e 69 74 65 | 20 6e 75 6d 62 65 72 0a |a finite| number.|
|000020e0| 20 20 20 20 62 79 20 7a | 65 72 6f 20 77 61 73 20 | by z|ero was |
|000020f0| 61 74 74 65 6d 70 74 65 | 64 20 28 64 75 72 69 6e |attempte|d (durin|
|00002100| 67 20 61 20 64 69 76 69 | 64 65 2d 69 6e 74 65 67 |g a divi|de-integ|
|00002110| 65 72 20 6f 72 20 64 69 | 76 69 64 65 20 6f 70 65 |er or di|vide ope|
|00002120| 72 61 74 69 6f 6e 2c 20 | 6f 72 20 61 0a 20 20 20 |ration, |or a. |
|00002130| 20 70 6f 77 65 72 20 6f | 70 65 72 61 74 69 6f 6e | power o|peration|
|00002140| 20 77 69 74 68 20 6e 65 | 67 61 74 69 76 65 20 72 | with ne|gative r|
|00002150| 69 67 68 74 2d 68 61 6e | 64 20 6f 70 65 72 61 6e |ight-han|d operan|
|00002160| 64 29 2c 20 61 6e 64 20 | 74 68 65 20 64 69 76 69 |d), and |the divi|
|00002170| 64 65 6e 64 20 77 61 73 | 0a 20 20 20 20 6e 6f 74 |dend was|. not|
|00002180| 20 7a 65 72 6f 2e 0a 0a | 20 20 20 20 54 68 65 20 | zero...| The |
|00002190| 72 65 73 75 6c 74 20 6f | 66 20 74 68 65 20 6f 70 |result o|f the op|
|000021a0| 65 72 61 74 69 6f 6e 20 | 69 73 20 5b 73 69 67 6e |eration |is [sign|
|000021b0| 2c 69 6e 66 5d 2c 20 77 | 68 65 72 65 20 73 69 67 |,inf], w|here sig|
|000021c0| 6e 20 69 73 20 74 68 65 | 20 65 78 63 6c 75 73 69 |n is the| exclusi|
|000021d0| 76 65 0a 20 20 20 20 6f | 72 20 6f 66 20 74 68 65 |ve. o|r of the|
|000021e0| 20 73 69 67 6e 73 20 6f | 66 20 74 68 65 20 6f 70 | signs o|f the op|
|000021f0| 65 72 61 6e 64 73 20 66 | 6f 72 20 64 69 76 69 64 |erands f|or divid|
|00002200| 65 2c 20 6f 72 20 69 73 | 20 31 20 66 6f 72 20 61 |e, or is| 1 for a|
|00002210| 6e 20 6f 64 64 20 70 6f | 77 65 72 20 6f 66 0a 20 |n odd po|wer of. |
|00002220| 20 20 20 2d 30 2c 20 66 | 6f 72 20 70 6f 77 65 72 | -0, f|or power|
|00002230| 2e 0a 20 20 20 20 63 03 | 00 00 00 04 00 00 00 02 |.. c.|........|
|00002240| 00 00 00 47 00 00 00 73 | 08 00 00 00 74 00 00 7c |...G...s|....t..||
|00002250| 02 00 19 53 28 01 00 00 | 00 4e 28 01 00 00 00 74 |...S(...|.N(....t|
|00002260| 0f 00 00 00 5f 53 69 67 | 6e 65 64 49 6e 66 69 6e |...._Sig|nedInfin|
|00002270| 69 74 79 28 04 00 00 00 | 52 1d 00 00 00 52 1e 00 |ity(....|R....R..|
|00002280| 00 00 74 04 00 00 00 73 | 69 67 6e 52 1b 00 00 00 |..t....s|ignR....|
|00002290| 28 00 00 00 00 28 00 00 | 00 00 73 1d 00 00 00 2f |(....(..|..s..../|
|000022a0| 75 73 72 2f 6c 69 62 2f | 70 79 74 68 6f 6e 32 2e |usr/lib/|python2.|
|000022b0| 36 2f 64 65 63 69 6d 61 | 6c 2e 70 79 52 1f 00 00 |6/decima|l.pyR...|
|000022c0| 00 f5 00 00 00 73 02 00 | 00 00 00 01 28 04 00 00 |.....s..|....(...|
|000022d0| 00 52 20 00 00 00 52 21 | 00 00 00 52 22 00 00 00 |.R ...R!|...R"...|
|000022e0| 52 1f 00 00 00 28 00 00 | 00 00 28 00 00 00 00 28 |R....(..|..(....(|
|000022f0| 00 00 00 00 73 1d 00 00 | 00 2f 75 73 72 2f 6c 69 |....s...|./usr/li|
|00002300| 62 2f 70 79 74 68 6f 6e | 32 2e 36 2f 64 65 63 69 |b/python|2.6/deci|
|00002310| 6d 61 6c 2e 70 79 52 08 | 00 00 00 e8 00 00 00 73 |mal.pyR.|.......s|
|00002320| 04 00 00 00 06 0b 06 02 | 74 12 00 00 00 44 69 76 |........|t....Div|
|00002330| 69 73 69 6f 6e 49 6d 70 | 6f 73 73 69 62 6c 65 63 |isionImp|ossiblec|
|00002340| 00 00 00 00 00 00 00 00 | 01 00 00 00 42 00 00 00 |........|....B...|
|00002350| 73 17 00 00 00 65 00 00 | 5a 01 00 64 00 00 5a 02 |s....e..|Z..d..Z.|
|00002360| 00 64 01 00 84 00 00 5a | 03 00 52 53 28 02 00 00 |.d.....Z|..RS(...|
|00002370| 00 73 f3 00 00 00 43 61 | 6e 6e 6f 74 20 70 65 72 |.s....Ca|nnot per|
|00002380| 66 6f 72 6d 20 74 68 65 | 20 64 69 76 69 73 69 6f |form the| divisio|
|00002390| 6e 20 61 64 65 71 75 61 | 74 65 6c 79 2e 0a 0a 20 |n adequa|tely... |
|000023a0| 20 20 20 54 68 69 73 20 | 6f 63 63 75 72 73 20 61 | This |occurs a|
|000023b0| 6e 64 20 73 69 67 6e 61 | 6c 73 20 69 6e 76 61 6c |nd signa|ls inval|
|000023c0| 69 64 2d 6f 70 65 72 61 | 74 69 6f 6e 20 69 66 20 |id-opera|tion if |
|000023d0| 74 68 65 20 69 6e 74 65 | 67 65 72 20 72 65 73 75 |the inte|ger resu|
|000023e0| 6c 74 20 6f 66 20 61 0a | 20 20 20 20 64 69 76 69 |lt of a.| divi|
|000023f0| 64 65 2d 69 6e 74 65 67 | 65 72 20 6f 72 20 72 65 |de-integ|er or re|
|00002400| 6d 61 69 6e 64 65 72 20 | 6f 70 65 72 61 74 69 6f |mainder |operatio|
|00002410| 6e 20 68 61 64 20 74 6f | 6f 20 6d 61 6e 79 20 64 |n had to|o many d|
|00002420| 69 67 69 74 73 20 28 77 | 6f 75 6c 64 20 62 65 0a |igits (w|ould be.|
|00002430| 20 20 20 20 6c 6f 6e 67 | 65 72 20 74 68 61 6e 20 | long|er than |
|00002440| 70 72 65 63 69 73 69 6f | 6e 29 2e 20 20 54 68 65 |precisio|n). The|
|00002450| 20 72 65 73 75 6c 74 20 | 69 73 20 5b 30 2c 71 4e | result |is [0,qN|
|00002460| 61 4e 5d 2e 0a 20 20 20 | 20 63 02 00 00 00 03 00 |aN].. | c......|
|00002470| 00 00 01 00 00 00 47 00 | 00 00 73 04 00 00 00 74 |......G.|..s....t|
|00002480| 00 00 53 28 01 00 00 00 | 4e 28 01 00 00 00 52 29 |..S(....|N(....R)|
|00002490| 00 00 00 28 03 00 00 00 | 52 1d 00 00 00 52 1e 00 |...(....|R....R..|
|000024a0| 00 00 52 1b 00 00 00 28 | 00 00 00 00 28 00 00 00 |..R....(|....(...|
|000024b0| 00 73 1d 00 00 00 2f 75 | 73 72 2f 6c 69 62 2f 70 |.s..../u|sr/lib/p|
|000024c0| 79 74 68 6f 6e 32 2e 36 | 2f 64 65 63 69 6d 61 6c |ython2.6|/decimal|
|000024d0| 2e 70 79 52 1f 00 00 00 | 00 01 00 00 73 02 00 00 |.pyR....|....s...|
|000024e0| 00 00 01 28 04 00 00 00 | 52 20 00 00 00 52 21 00 |...(....|R ...R!.|
|000024f0| 00 00 52 22 00 00 00 52 | 1f 00 00 00 28 00 00 00 |..R"...R|....(...|
|00002500| 00 28 00 00 00 00 28 00 | 00 00 00 73 1d 00 00 00 |.(....(.|...s....|
|00002510| 2f 75 73 72 2f 6c 69 62 | 2f 70 79 74 68 6f 6e 32 |/usr/lib|/python2|
|00002520| 2e 36 2f 64 65 63 69 6d | 61 6c 2e 70 79 52 2e 00 |.6/decim|al.pyR..|
|00002530| 00 00 f8 00 00 00 73 04 | 00 00 00 06 06 06 02 74 |......s.|.......t|
|00002540| 11 00 00 00 44 69 76 69 | 73 69 6f 6e 55 6e 64 65 |....Divi|sionUnde|
|00002550| 66 69 6e 65 64 63 00 00 | 00 00 00 00 00 00 01 00 |finedc..|........|
|00002560| 00 00 42 00 00 00 73 17 | 00 00 00 65 00 00 5a 01 |..B...s.|...e..Z.|
|00002570| 00 64 00 00 5a 02 00 64 | 01 00 84 00 00 5a 03 00 |.d..Z..d|.....Z..|
|00002580| 52 53 28 02 00 00 00 73 | ee 00 00 00 55 6e 64 65 |RS(....s|....Unde|
|00002590| 66 69 6e 65 64 20 72 65 | 73 75 6c 74 20 6f 66 20 |fined re|sult of |
|000025a0| 64 69 76 69 73 69 6f 6e | 2e 0a 0a 20 20 20 20 54 |division|... T|
|000025b0| 68 69 73 20 6f 63 63 75 | 72 73 20 61 6e 64 20 73 |his occu|rs and s|
|000025c0| 69 67 6e 61 6c 73 20 69 | 6e 76 61 6c 69 64 2d 6f |ignals i|nvalid-o|
|000025d0| 70 65 72 61 74 69 6f 6e | 20 69 66 20 64 69 76 69 |peration| if divi|
|000025e0| 73 69 6f 6e 20 62 79 20 | 7a 65 72 6f 20 77 61 73 |sion by |zero was|
|000025f0| 0a 20 20 20 20 61 74 74 | 65 6d 70 74 65 64 20 28 |. att|empted (|
|00002600| 64 75 72 69 6e 67 20 61 | 20 64 69 76 69 64 65 2d |during a| divide-|
|00002610| 69 6e 74 65 67 65 72 2c | 20 64 69 76 69 64 65 2c |integer,| divide,|
|00002620| 20 6f 72 20 72 65 6d 61 | 69 6e 64 65 72 20 6f 70 | or rema|inder op|
|00002630| 65 72 61 74 69 6f 6e 29 | 2c 20 61 6e 64 0a 20 20 |eration)|, and. |
|00002640| 20 20 74 68 65 20 64 69 | 76 69 64 65 6e 64 20 69 | the di|vidend i|
|00002650| 73 20 61 6c 73 6f 20 7a | 65 72 6f 2e 20 20 54 68 |s also z|ero. Th|
|00002660| 65 20 72 65 73 75 6c 74 | 20 69 73 20 5b 30 2c 71 |e result| is [0,q|
|00002670| 4e 61 4e 5d 2e 0a 20 20 | 20 20 63 02 00 00 00 03 |NaN].. | c.....|
|00002680| 00 00 00 01 00 00 00 47 | 00 00 00 73 04 00 00 00 |.......G|...s....|
|00002690| 74 00 00 53 28 01 00 00 | 00 4e 28 01 00 00 00 52 |t..S(...|.N(....R|
|000026a0| 29 00 00 00 28 03 00 00 | 00 52 1d 00 00 00 52 1e |)...(...|.R....R.|
|000026b0| 00 00 00 52 1b 00 00 00 | 28 00 00 00 00 28 00 00 |...R....|(....(..|
|000026c0| 00 00 73 1d 00 00 00 2f | 75 73 72 2f 6c 69 62 2f |..s..../|usr/lib/|
|000026d0| 70 79 74 68 6f 6e 32 2e | 36 2f 64 65 63 69 6d 61 |python2.|6/decima|
|000026e0| 6c 2e 70 79 52 1f 00 00 | 00 0b 01 00 00 73 02 00 |l.pyR...|.....s..|
|000026f0| 00 00 00 01 28 04 00 00 | 00 52 20 00 00 00 52 21 |....(...|.R ...R!|
|00002700| 00 00 00 52 22 00 00 00 | 52 1f 00 00 00 28 00 00 |...R"...|R....(..|
|00002710| 00 00 28 00 00 00 00 28 | 00 00 00 00 73 1d 00 00 |..(....(|....s...|
|00002720| 00 2f 75 73 72 2f 6c 69 | 62 2f 70 79 74 68 6f 6e |./usr/li|b/python|
|00002730| 32 2e 36 2f 64 65 63 69 | 6d 61 6c 2e 70 79 52 2f |2.6/deci|mal.pyR/|
|00002740| 00 00 00 03 01 00 00 73 | 04 00 00 00 06 06 06 02 |.......s|........|
|00002750| 63 00 00 00 00 00 00 00 | 00 01 00 00 00 42 00 00 |c.......|.....B..|
|00002760| 00 73 0e 00 00 00 65 00 | 00 5a 01 00 64 00 00 5a |.s....e.|.Z..d..Z|
|00002770| 02 00 52 53 28 01 00 00 | 00 73 ad 01 00 00 48 61 |..RS(...|.s....Ha|
|00002780| 64 20 74 6f 20 72 6f 75 | 6e 64 2c 20 6c 6f 73 69 |d to rou|nd, losi|
|00002790| 6e 67 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 2e 0a |ng infor|mation..|
|000027a0| 0a 20 20 20 20 54 68 69 | 73 20 6f 63 63 75 72 73 |. Thi|s occurs|
|000027b0| 20 61 6e 64 20 73 69 67 | 6e 61 6c 73 20 69 6e 65 | and sig|nals ine|
|000027c0| 78 61 63 74 20 77 68 65 | 6e 65 76 65 72 20 74 68 |xact whe|never th|
|000027d0| 65 20 72 65 73 75 6c 74 | 20 6f 66 20 61 6e 20 6f |e result| of an o|
|000027e0| 70 65 72 61 74 69 6f 6e | 20 69 73 0a 20 20 20 20 |peration| is. |
|000027f0| 6e 6f 74 20 65 78 61 63 | 74 20 28 74 68 61 74 20 |not exac|t (that |
|00002800| 69 73 2c 20 69 74 20 6e | 65 65 64 65 64 20 74 6f |is, it n|eeded to|
|00002810| 20 62 65 20 72 6f 75 6e | 64 65 64 20 61 6e 64 20 | be roun|ded and |
|00002820| 61 6e 79 20 64 69 73 63 | 61 72 64 65 64 20 64 69 |any disc|arded di|
|00002830| 67 69 74 73 0a 20 20 20 | 20 77 65 72 65 20 6e 6f |gits. | were no|
|00002840| 6e 2d 7a 65 72 6f 29 2c | 20 6f 72 20 69 66 20 61 |n-zero),| or if a|
|00002850| 6e 20 6f 76 65 72 66 6c | 6f 77 20 6f 72 20 75 6e |n overfl|ow or un|
|00002860| 64 65 72 66 6c 6f 77 20 | 63 6f 6e 64 69 74 69 6f |derflow |conditio|
|00002870| 6e 20 6f 63 63 75 72 73 | 2e 20 20 54 68 65 0a 20 |n occurs|. The. |
|00002880| 20 20 20 72 65 73 75 6c | 74 20 69 6e 20 61 6c 6c | resul|t in all|
|00002890| 20 63 61 73 65 73 20 69 | 73 20 75 6e 63 68 61 6e | cases i|s unchan|
|000028a0| 67 65 64 2e 0a 0a 20 20 | 20 20 54 68 65 20 69 6e |ged... | The in|
|000028b0| 65 78 61 63 74 20 73 69 | 67 6e 61 6c 20 6d 61 79 |exact si|gnal may|
|000028c0| 20 62 65 20 74 65 73 74 | 65 64 20 28 6f 72 20 74 | be test|ed (or t|
|000028d0| 72 61 70 70 65 64 29 20 | 74 6f 20 64 65 74 65 72 |rapped) |to deter|
|000028e0| 6d 69 6e 65 20 69 66 20 | 61 20 67 69 76 65 6e 0a |mine if |a given.|
|000028f0| 20 20 20 20 6f 70 65 72 | 61 74 69 6f 6e 20 28 6f | oper|ation (o|
|00002900| 72 20 73 65 71 75 65 6e | 63 65 20 6f 66 20 6f 70 |r sequen|ce of op|
|00002910| 65 72 61 74 69 6f 6e 73 | 29 20 77 61 73 20 69 6e |erations|) was in|
|00002920| 65 78 61 63 74 2e 0a 20 | 20 20 20 28 03 00 00 00 |exact.. | (....|
|00002930| 52 20 00 00 00 52 21 00 | 00 00 52 22 00 00 00 28 |R ...R!.|..R"...(|
|00002940| 00 00 00 00 28 00 00 00 | 00 28 00 00 00 00 73 1d |....(...|.(....s.|
|00002950| 00 00 00 2f 75 73 72 2f | 6c 69 62 2f 70 79 74 68 |.../usr/|lib/pyth|
|00002960| 6f 6e 32 2e 36 2f 64 65 | 63 69 6d 61 6c 2e 70 79 |on2.6/de|cimal.py|
|00002970| 52 09 00 00 00 0e 01 00 | 00 73 02 00 00 00 06 0a |R.......|.s......|
|00002980| 74 0e 00 00 00 49 6e 76 | 61 6c 69 64 43 6f 6e 74 |t....Inv|alidCont|
|00002990| 65 78 74 63 00 00 00 00 | 00 00 00 00 01 00 00 00 |extc....|........|
|000029a0| 42 00 00 00 73 17 00 00 | 00 65 00 00 5a 01 00 64 |B...s...|.e..Z..d|
|000029b0| 00 00 5a 02 00 64 01 00 | 84 00 00 5a 03 00 52 53 |..Z..d..|...Z..RS|
|000029c0| 28 02 00 00 00 73 ec 01 | 00 00 49 6e 76 61 6c 69 |(....s..|..Invali|
|000029d0| 64 20 63 6f 6e 74 65 78 | 74 2e 20 20 55 6e 6b 6e |d contex|t. Unkn|
|000029e0| 6f 77 6e 20 72 6f 75 6e | 64 69 6e 67 2c 20 66 6f |own roun|ding, fo|
|000029f0| 72 20 65 78 61 6d 70 6c | 65 2e 0a 0a 20 20 20 20 |r exampl|e... |
|00002a00| 54 68 69 73 20 6f 63 63 | 75 72 73 20 61 6e 64 20 |This occ|urs and |
|00002a10| 73 69 67 6e 61 6c 73 20 | 69 6e 76 61 6c 69 64 2d |signals |invalid-|
|00002a20| 6f 70 65 72 61 74 69 6f | 6e 20 69 66 20 61 6e 20 |operatio|n if an |
|00002a30| 69 6e 76 61 6c 69 64 20 | 63 6f 6e 74 65 78 74 20 |invalid |context |
|00002a40| 77 61 73 0a 20 20 20 20 | 64 65 74 65 63 74 65 64 |was. |detected|
|00002a50| 20 64 75 72 69 6e 67 20 | 61 6e 20 6f 70 65 72 61 | during |an opera|
|00002a60| 74 69 6f 6e 2e 20 20 54 | 68 69 73 20 63 61 6e 20 |tion. T|his can |
|00002a70| 6f 63 63 75 72 20 69 66 | 20 63 6f 6e 74 65 78 74 |occur if| context|
|00002a80| 73 20 61 72 65 20 6e 6f | 74 20 63 68 65 63 6b 65 |s are no|t checke|
|00002a90| 64 0a 20 20 20 20 6f 6e | 20 63 72 65 61 74 69 6f |d. on| creatio|
|00002aa0| 6e 20 61 6e 64 20 65 69 | 74 68 65 72 20 74 68 65 |n and ei|ther the|
|00002ab0| 20 70 72 65 63 69 73 69 | 6f 6e 20 65 78 63 65 65 | precisi|on excee|
|00002ac0| 64 73 20 74 68 65 20 63 | 61 70 61 62 69 6c 69 74 |ds the c|apabilit|
|00002ad0| 79 20 6f 66 20 74 68 65 | 0a 20 20 20 20 75 6e 64 |y of the|. und|
|00002ae0| 65 72 6c 79 69 6e 67 20 | 63 6f 6e 63 72 65 74 65 |erlying |concrete|
|00002af0| 20 72 65 70 72 65 73 65 | 6e 74 61 74 69 6f 6e 20 | represe|ntation |
|00002b00| 6f 72 20 61 6e 20 75 6e | 6b 6e 6f 77 6e 20 6f 72 |or an un|known or|
|00002b10| 20 75 6e 73 75 70 70 6f | 72 74 65 64 20 72 6f 75 | unsuppo|rted rou|
|00002b20| 6e 64 69 6e 67 0a 20 20 | 20 20 77 61 73 20 73 70 |nding. | was sp|
|00002b30| 65 63 69 66 69 65 64 2e | 20 20 54 68 65 73 65 20 |ecified.| These |
|00002b40| 61 73 70 65 63 74 73 20 | 6f 66 20 74 68 65 20 63 |aspects |of the c|
|00002b50| 6f 6e 74 65 78 74 20 6e | 65 65 64 20 6f 6e 6c 79 |ontext n|eed only|
|00002b60| 20 62 65 20 63 68 65 63 | 6b 65 64 20 77 68 65 6e | be chec|ked when|
|00002b70| 0a 20 20 20 20 74 68 65 | 20 76 61 6c 75 65 73 20 |. the| values |
|00002b80| 61 72 65 20 72 65 71 75 | 69 72 65 64 20 74 6f 20 |are requ|ired to |
|00002b90| 62 65 20 75 73 65 64 2e | 20 20 54 68 65 20 72 65 |be used.| The re|
|00002ba0| 73 75 6c 74 20 69 73 20 | 5b 30 2c 71 4e 61 4e 5d |sult is |[0,qNaN]|
|00002bb0| 2e 0a 20 20 20 20 63 02 | 00 00 00 03 00 00 00 01 |.. c.|........|
|00002bc0| 00 00 00 47 00 00 00 73 | 04 00 00 00 74 00 00 53 |...G...s|....t..S|
|00002bd0| 28 01 00 00 00 4e 28 01 | 00 00 00 52 29 00 00 00 |(....N(.|...R)...|
|00002be0| 28 03 00 00 00 52 1d 00 | 00 00 52 1e 00 00 00 52 |(....R..|..R....R|
|00002bf0| 1b 00 00 00 28 00 00 00 | 00 28 00 00 00 00 73 1d |....(...|.(....s.|
|00002c00| 00 00 00 2f 75 73 72 2f | 6c 69 62 2f 70 79 74 68 |.../usr/|lib/pyth|
|00002c10| 6f 6e 32 2e 36 2f 64 65 | 63 69 6d 61 6c 2e 70 79 |on2.6/de|cimal.py|
|00002c20| 52 1f 00 00 00 25 01 00 | 00 73 02 00 00 00 00 01 |R....%..|.s......|
|00002c30| 28 04 00 00 00 52 20 00 | 00 00 52 21 00 00 00 52 |(....R .|..R!...R|
|00002c40| 22 00 00 00 52 1f 00 00 | 00 28 00 00 00 00 28 00 |"...R...|.(....(.|
|00002c50| 00 00 00 28 00 00 00 00 | 73 1d 00 00 00 2f 75 73 |...(....|s..../us|
|00002c60| 72 2f 6c 69 62 2f 70 79 | 74 68 6f 6e 32 2e 36 2f |r/lib/py|thon2.6/|
|00002c70| 64 65 63 69 6d 61 6c 2e | 70 79 52 30 00 00 00 1a |decimal.|pyR0....|
|00002c80| 01 00 00 73 04 00 00 00 | 06 09 06 02 63 00 00 00 |...s....|....c...|
|00002c90| 00 00 00 00 00 01 00 00 | 00 42 00 00 00 73 0e 00 |........|.B...s..|
|00002ca0| 00 00 65 00 00 5a 01 00 | 64 00 00 5a 02 00 52 53 |..e..Z..|d..Z..RS|
|00002cb0| 28 01 00 00 00 73 d9 01 | 00 00 4e 75 6d 62 65 72 |(....s..|..Number|
|00002cc0| 20 67 6f 74 20 72 6f 75 | 6e 64 65 64 20 28 6e 6f | got rou|nded (no|
|00002cd0| 74 20 20 6e 65 63 65 73 | 73 61 72 69 6c 79 20 63 |t neces|sarily c|
|00002ce0| 68 61 6e 67 65 64 20 64 | 75 72 69 6e 67 20 72 6f |hanged d|uring ro|
|00002cf0| 75 6e 64 69 6e 67 29 2e | 0a 0a 20 20 20 20 54 68 |unding).|.. Th|
|00002d00| 69 73 20 6f 63 63 75 72 | 73 20 61 6e 64 20 73 69 |is occur|s and si|
|00002d10| 67 6e 61 6c 73 20 72 6f | 75 6e 64 65 64 20 77 68 |gnals ro|unded wh|
|00002d20| 65 6e 65 76 65 72 20 74 | 68 65 20 72 65 73 75 6c |enever t|he resul|
|00002d30| 74 20 6f 66 20 61 6e 20 | 6f 70 65 72 61 74 69 6f |t of an |operatio|
|00002d40| 6e 20 69 73 0a 20 20 20 | 20 72 6f 75 6e 64 65 64 |n is. | rounded|
|00002d50| 20 28 74 68 61 74 20 69 | 73 2c 20 73 6f 6d 65 20 | (that i|s, some |
|00002d60| 7a 65 72 6f 20 6f 72 20 | 6e 6f 6e 2d 7a 65 72 6f |zero or |non-zero|
|00002d70| 20 64 69 67 69 74 73 20 | 77 65 72 65 20 64 69 73 | digits |were dis|
|00002d80| 63 61 72 64 65 64 20 66 | 72 6f 6d 20 74 68 65 0a |carded f|rom the.|
|00002d90| 20 20 20 20 63 6f 65 66 | 66 69 63 69 65 6e 74 29 | coef|ficient)|
|00002da0| 2c 20 6f 72 20 69 66 20 | 61 6e 20 6f 76 65 72 66 |, or if |an overf|
|00002db0| 6c 6f 77 20 6f 72 20 75 | 6e 64 65 72 66 6c 6f 77 |low or u|nderflow|
|00002dc0| 20 63 6f 6e 64 69 74 69 | 6f 6e 20 6f 63 63 75 72 | conditi|on occur|
|00002dd0| 73 2e 20 20 54 68 65 0a | 20 20 20 20 72 65 73 75 |s. The.| resu|
|00002de0| 6c 74 20 69 6e 20 61 6c | 6c 20 63 61 73 65 73 20 |lt in al|l cases |
|00002df0| 69 73 20 75 6e 63 68 61 | 6e 67 65 64 2e 0a 0a 20 |is uncha|nged... |
|00002e00| 20 20 20 54 68 65 20 72 | 6f 75 6e 64 65 64 20 73 | The r|ounded s|
|00002e10| 69 67 6e 61 6c 20 6d 61 | 79 20 62 65 20 74 65 73 |ignal ma|y be tes|
|00002e20| 74 65 64 20 28 6f 72 20 | 74 72 61 70 70 65 64 29 |ted (or |trapped)|
|00002e30| 20 74 6f 20 64 65 74 65 | 72 6d 69 6e 65 20 69 66 | to dete|rmine if|
|00002e40| 20 61 20 67 69 76 65 6e | 0a 20 20 20 20 6f 70 65 | a given|. ope|
|00002e50| 72 61 74 69 6f 6e 20 28 | 6f 72 20 73 65 71 75 65 |ration (|or seque|
|00002e60| 6e 63 65 20 6f 66 20 6f | 70 65 72 61 74 69 6f 6e |nce of o|peration|
|00002e70| 73 29 20 63 61 75 73 65 | 64 20 61 20 6c 6f 73 73 |s) cause|d a loss|
|00002e80| 20 6f 66 20 70 72 65 63 | 69 73 69 6f 6e 2e 0a 20 | of prec|ision.. |
|00002e90| 20 20 20 28 03 00 00 00 | 52 20 00 00 00 52 21 00 | (....|R ...R!.|
|00002ea0| 00 00 52 22 00 00 00 28 | 00 00 00 00 28 00 00 00 |..R"...(|....(...|
|00002eb0| 00 28 00 00 00 00 73 1d | 00 00 00 2f 75 73 72 2f |.(....s.|.../usr/|
|00002ec0| 6c 69 62 2f 70 79 74 68 | 6f 6e 32 2e 36 2f 64 65 |lib/pyth|on2.6/de|
|00002ed0| 63 69 6d 61 6c 2e 70 79 | 52 0a 00 00 00 28 01 00 |cimal.py|R....(..|
|00002ee0| 00 73 02 00 00 00 06 0a | 63 00 00 00 00 00 00 00 |.s......|c.......|
|00002ef0| 00 01 00 00 00 42 00 00 | 00 73 0e 00 00 00 65 00 |.....B..|.s....e.|
|00002f00| 00 5a 01 00 64 00 00 5a | 02 00 52 53 28 01 00 00 |.Z..d..Z|..RS(...|
|00002f10| 00 73 98 01 00 00 45 78 | 70 6f 6e 65 6e 74 20 3c |.s....Ex|ponent <|
|00002f20| 20 45 6d 69 6e 20 62 65 | 66 6f 72 65 20 72 6f 75 | Emin be|fore rou|
|00002f30| 6e 64 69 6e 67 2e 0a 0a | 20 20 20 20 54 68 69 73 |nding...| This|
|00002f40| 20 6f 63 63 75 72 73 20 | 61 6e 64 20 73 69 67 6e | occurs |and sign|
|00002f50| 61 6c 73 20 73 75 62 6e | 6f 72 6d 61 6c 20 77 68 |als subn|ormal wh|
|00002f60| 65 6e 65 76 65 72 20 74 | 68 65 20 72 65 73 75 6c |enever t|he resul|
|00002f70| 74 20 6f 66 20 61 20 63 | 6f 6e 76 65 72 73 69 6f |t of a c|onversio|
|00002f80| 6e 20 6f 72 0a 20 20 20 | 20 6f 70 65 72 61 74 69 |n or. | operati|
|00002f90| 6f 6e 20 69 73 20 73 75 | 62 6e 6f 72 6d 61 6c 20 |on is su|bnormal |
|00002fa0| 28 74 68 61 74 20 69 73 | 2c 20 69 74 73 20 61 64 |(that is|, its ad|
|00002fb0| 6a 75 73 74 65 64 20 65 | 78 70 6f 6e 65 6e 74 20 |justed e|xponent |
|00002fc0| 69 73 20 6c 65 73 73 20 | 74 68 61 6e 0a 20 20 20 |is less |than. |
|00002fd0| 20 45 6d 69 6e 2c 20 62 | 65 66 6f 72 65 20 61 6e | Emin, b|efore an|
|00002fe0| 79 20 72 6f 75 6e 64 69 | 6e 67 29 2e 20 20 54 68 |y roundi|ng). Th|
|00002ff0| 65 20 72 65 73 75 6c 74 | 20 69 6e 20 61 6c 6c 20 |e result| in all |
|00003000| 63 61 73 65 73 20 69 73 | 20 75 6e 63 68 61 6e 67 |cases is| unchang|
|00003010| 65 64 2e 0a 0a 20 20 20 | 20 54 68 65 20 73 75 62 |ed... | The sub|
|00003020| 6e 6f 72 6d 61 6c 20 73 | 69 67 6e 61 6c 20 6d 61 |normal s|ignal ma|
|00003030| 79 20 62 65 20 74 65 73 | 74 65 64 20 28 6f 72 20 |y be tes|ted (or |
|00003040| 74 72 61 70 70 65 64 29 | 20 74 6f 20 64 65 74 65 |trapped)| to dete|
|00003050| 72 6d 69 6e 65 20 69 66 | 20 61 20 67 69 76 65 6e |rmine if| a given|
|00003060| 0a 20 20 20 20 6f 72 20 | 6f 70 65 72 61 74 69 6f |. or |operatio|
|00003070| 6e 20 28 6f 72 20 73 65 | 71 75 65 6e 63 65 20 6f |n (or se|quence o|
|00003080| 66 20 6f 70 65 72 61 74 | 69 6f 6e 73 29 20 79 69 |f operat|ions) yi|
|00003090| 65 6c 64 65 64 20 61 20 | 73 75 62 6e 6f 72 6d 61 |elded a |subnorma|
|000030a0| 6c 20 72 65 73 75 6c 74 | 2e 0a 20 20 20 20 28 03 |l result|.. (.|
|000030b0| 00 00 00 52 20 00 00 00 | 52 21 00 00 00 52 22 00 |...R ...|R!...R".|
|000030c0| 00 00 28 00 00 00 00 28 | 00 00 00 00 28 00 00 00 |..(....(|....(...|
|000030d0| 00 73 1d 00 00 00 2f 75 | 73 72 2f 6c 69 62 2f 70 |.s..../u|sr/lib/p|
|000030e0| 79 74 68 6f 6e 32 2e 36 | 2f 64 65 63 69 6d 61 6c |ython2.6|/decimal|
|000030f0| 2e 70 79 52 0b 00 00 00 | 34 01 00 00 73 02 00 00 |.pyR....|4...s...|
|00003100| 00 06 09 63 00 00 00 00 | 00 00 00 00 01 00 00 00 |...c....|........|
|00003110| 42 00 00 00 73 17 00 00 | 00 65 00 00 5a 01 00 64 |B...s...|.e..Z..d|
|00003120| 00 00 5a 02 00 64 01 00 | 84 00 00 5a 03 00 52 53 |..Z..d..|...Z..RS|
|00003130| 28 02 00 00 00 73 1a 04 | 00 00 4e 75 6d 65 72 69 |(....s..|..Numeri|
|00003140| 63 61 6c 20 6f 76 65 72 | 66 6c 6f 77 2e 0a 0a 20 |cal over|flow... |
|00003150| 20 20 20 54 68 69 73 20 | 6f 63 63 75 72 73 20 61 | This |occurs a|
|00003160| 6e 64 20 73 69 67 6e 61 | 6c 73 20 6f 76 65 72 66 |nd signa|ls overf|
|00003170| 6c 6f 77 20 69 66 20 74 | 68 65 20 61 64 6a 75 73 |low if t|he adjus|
|00003180| 74 65 64 20 65 78 70 6f | 6e 65 6e 74 20 6f 66 20 |ted expo|nent of |
|00003190| 61 20 72 65 73 75 6c 74 | 0a 20 20 20 20 28 66 72 |a result|. (fr|
|000031a0| 6f 6d 20 61 20 63 6f 6e | 76 65 72 73 69 6f 6e 20 |om a con|version |
|000031b0| 6f 72 20 66 72 6f 6d 20 | 61 6e 20 6f 70 65 72 61 |or from |an opera|
|000031c0| 74 69 6f 6e 20 74 68 61 | 74 20 69 73 20 6e 6f 74 |tion tha|t is not|
|000031d0| 20 61 6e 20 61 74 74 65 | 6d 70 74 20 74 6f 20 64 | an atte|mpt to d|
|000031e0| 69 76 69 64 65 0a 20 20 | 20 20 62 79 20 7a 65 72 |ivide. | by zer|
|000031f0| 6f 29 2c 20 61 66 74 65 | 72 20 72 6f 75 6e 64 69 |o), afte|r roundi|
|00003200| 6e 67 2c 20 77 6f 75 6c | 64 20 62 65 20 67 72 65 |ng, woul|d be gre|
|00003210| 61 74 65 72 20 74 68 61 | 6e 20 74 68 65 20 6c 61 |ater tha|n the la|
|00003220| 72 67 65 73 74 20 76 61 | 6c 75 65 20 74 68 61 74 |rgest va|lue that|
|00003230| 0a 20 20 20 20 63 61 6e | 20 62 65 20 68 61 6e 64 |. can| be hand|
|00003240| 6c 65 64 20 62 79 20 74 | 68 65 20 69 6d 70 6c 65 |led by t|he imple|
|00003250| 6d 65 6e 74 61 74 69 6f | 6e 20 28 74 68 65 20 76 |mentatio|n (the v|
|00003260| 61 6c 75 65 20 45 6d 61 | 78 29 2e 0a 0a 20 20 20 |alue Ema|x)... |
|00003270| 20 54 68 65 20 72 65 73 | 75 6c 74 20 64 65 70 65 | The res|ult depe|
|00003280| 6e 64 73 20 6f 6e 20 74 | 68 65 20 72 6f 75 6e 64 |nds on t|he round|
|00003290| 69 6e 67 20 6d 6f 64 65 | 3a 0a 0a 20 20 20 20 46 |ing mode|:.. F|
|000032a0| 6f 72 20 72 6f 75 6e 64 | 2d 68 61 6c 66 2d 75 70 |or round|-half-up|
|000032b0| 20 61 6e 64 20 72 6f 75 | 6e 64 2d 68 61 6c 66 2d | and rou|nd-half-|
|000032c0| 65 76 65 6e 20 28 61 6e | 64 20 66 6f 72 20 72 6f |even (an|d for ro|
|000032d0| 75 6e 64 2d 68 61 6c 66 | 2d 64 6f 77 6e 20 61 6e |und-half|-down an|
|000032e0| 64 0a 20 20 20 20 72 6f | 75 6e 64 2d 75 70 2c 20 |d. ro|und-up, |
|000032f0| 69 66 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 29 2c |if imple|mented),|
|00003300| 20 74 68 65 20 72 65 73 | 75 6c 74 20 6f 66 20 74 | the res|ult of t|
|00003310| 68 65 20 6f 70 65 72 61 | 74 69 6f 6e 20 69 73 20 |he opera|tion is |
|00003320| 5b 73 69 67 6e 2c 69 6e | 66 5d 2c 0a 20 20 20 20 |[sign,in|f],. |
|00003330| 77 68 65 72 65 20 73 69 | 67 6e 20 69 73 20 74 68 |where si|gn is th|
|00003340| 65 20 73 69 67 6e 20 6f | 66 20 74 68 65 20 69 6e |e sign o|f the in|
|00003350| 74 65 72 6d 65 64 69 61 | 74 65 20 72 65 73 75 6c |termedia|te resul|
|00003360| 74 2e 20 20 46 6f 72 20 | 72 6f 75 6e 64 2d 64 6f |t. For |round-do|
|00003370| 77 6e 2c 20 74 68 65 0a | 20 20 20 20 72 65 73 75 |wn, the.| resu|
|00003380| 6c 74 20 69 73 20 74 68 | 65 20 6c 61 72 67 65 73 |lt is th|e larges|
|00003390| 74 20 66 69 6e 69 74 65 | 20 6e 75 6d 62 65 72 20 |t finite| number |
|000033a0| 74 68 61 74 20 63 61 6e | 20 62 65 20 72 65 70 72 |that can| be repr|
|000033b0| 65 73 65 6e 74 65 64 20 | 69 6e 20 74 68 65 0a 20 |esented |in the. |
|000033c0| 20 20 20 63 75 72 72 65 | 6e 74 20 70 72 65 63 69 | curre|nt preci|
|000033d0| 73 69 6f 6e 2c 20 77 69 | 74 68 20 74 68 65 20 73 |sion, wi|th the s|
|000033e0| 69 67 6e 20 6f 66 20 74 | 68 65 20 69 6e 74 65 72 |ign of t|he inter|
|000033f0| 6d 65 64 69 61 74 65 20 | 72 65 73 75 6c 74 2e 20 |mediate |result. |
|00003400| 20 46 6f 72 0a 20 20 20 | 20 72 6f 75 6e 64 2d 63 | For. | round-c|
|00003410| 65 69 6c 69 6e 67 2c 20 | 74 68 65 20 72 65 73 75 |eiling, |the resu|
|00003420| 6c 74 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 61 |lt is th|e same a|
|00003430| 73 20 66 6f 72 20 72 6f | 75 6e 64 2d 64 6f 77 6e |s for ro|und-down|
|00003440| 20 69 66 20 74 68 65 20 | 73 69 67 6e 20 6f 66 0a | if the |sign of.|
|00003450| 20 20 20 20 74 68 65 20 | 69 6e 74 65 72 6d 65 64 | the |intermed|
|00003460| 69 61 74 65 20 72 65 73 | 75 6c 74 20 69 73 20 31 |iate res|ult is 1|
|00003470| 2c 20 6f 72 20 69 73 20 | 5b 30 2c 69 6e 66 5d 20 |, or is |[0,inf] |
|00003480| 6f 74 68 65 72 77 69 73 | 65 2e 20 20 46 6f 72 20 |otherwis|e. For |
|00003490| 72 6f 75 6e 64 2d 66 6c | 6f 6f 72 2c 0a 20 20 20 |round-fl|oor,. |
|000034a0| 20 74 68 65 20 72 65 73 | 75 6c 74 20 69 73 20 74 | the res|ult is t|
|000034b0| 68 65 20 73 61 6d 65 20 | 61 73 20 66 6f 72 20 72 |he same |as for r|
|000034c0| 6f 75 6e 64 2d 64 6f 77 | 6e 20 69 66 20 74 68 65 |ound-dow|n if the|
|000034d0| 20 73 69 67 6e 20 6f 66 | 20 74 68 65 20 69 6e 74 | sign of| the int|
|000034e0| 65 72 6d 65 64 69 61 74 | 65 0a 20 20 20 20 72 65 |ermediat|e. re|
|000034f0| 73 75 6c 74 20 69 73 20 | 30 2c 20 6f 72 20 69 73 |sult is |0, or is|
|00003500| 20 5b 31 2c 69 6e 66 5d | 20 6f 74 68 65 72 77 69 | [1,inf]| otherwi|
|00003510| 73 65 2e 20 20 49 6e 20 | 61 6c 6c 20 63 61 73 65 |se. In |all case|
|00003520| 73 2c 20 49 6e 65 78 61 | 63 74 20 61 6e 64 20 52 |s, Inexa|ct and R|
|00003530| 6f 75 6e 64 65 64 0a 20 | 20 20 20 77 69 6c 6c 20 |ounded. | will |
|00003540| 61 6c 73 6f 20 62 65 20 | 72 61 69 73 65 64 2e 0a |also be |raised..|
|00003550| 20 20 20 20 63 03 00 00 | 00 04 00 00 00 05 00 00 | c...|........|
|00003560| 00 47 00 00 00 73 c1 00 | 00 00 7c 01 00 69 00 00 |.G...s..|..|..i..|
|00003570| 74 01 00 74 02 00 74 03 | 00 74 04 00 66 04 00 6a |t..t..t.|.t..f..j|
|00003580| 06 00 6f 09 00 01 74 05 | 00 7c 02 00 19 53 01 7c |..o...t.|.|...S.||
|00003590| 02 00 64 01 00 6a 02 00 | 6f 3f 00 01 7c 01 00 69 |..d..j..|o?..|..i|
|000035a0| 00 00 74 06 00 6a 02 00 | 6f 09 00 01 74 05 00 7c |..t..j..|o...t..||
|000035b0| 02 00 19 53 01 74 07 00 | 7c 02 00 64 02 00 7c 01 |...S.t..||..d..|.|
|000035c0| 00 69 08 00 14 7c 01 00 | 69 09 00 7c 01 00 69 08 |.i...|..|i..|..i.|
|000035d0| 00 18 64 03 00 17 83 03 | 00 53 01 7c 02 00 64 03 |..d.....|.S.|..d.|
|000035e0| 00 6a 02 00 6f 3f 00 01 | 7c 01 00 69 00 00 74 0a |.j..o?..||..i..t.|
|000035f0| 00 6a 02 00 6f 09 00 01 | 74 05 00 7c 02 00 19 53 |.j..o...|t..|...S|
|00003600| 01 74 07 00 7c 02 00 64 | 02 00 7c 01 00 69 08 00 |.t..|..d|..|..i..|
|00003610| 14 7c 01 00 69 09 00 7c | 01 00 69 08 00 18 64 03 |.|..i..||..i...d.|
|00003620| 00 17 83 03 00 53 01 64 | 00 00 53 28 04 00 00 00 |.....S.d|..S(....|
|00003630| 4e 69 00 00 00 00 74 01 | 00 00 00 39 69 01 00 00 |Ni....t.|...9i...|
|00003640| 00 28 0b 00 00 00 74 08 | 00 00 00 72 6f 75 6e 64 |.(....t.|...round|
|00003650| 69 6e 67 52 0f 00 00 00 | 52 10 00 00 00 52 14 00 |ingR....|R....R..|
|00003660| 00 00 52 13 00 00 00 52 | 2c 00 00 00 52 11 00 00 |..R....R|,...R...|
|00003670| 00 52 24 00 00 00 74 04 | 00 00 00 70 72 65 63 74 |.R$...t.|...prect|
|00003680| 04 00 00 00 45 6d 61 78 | 52 12 00 00 00 28 04 00 |....Emax|R....(..|
|00003690| 00 00 52 1d 00 00 00 52 | 1e 00 00 00 52 2d 00 00 |..R....R|....R-..|
|000036a0| 00 52 1b 00 00 00 28 00 | 00 00 00 28 00 00 00 00 |.R....(.|...(....|
|000036b0| 73 1d 00 00 00 2f 75 73 | 72 2f 6c 69 62 2f 70 79 |s..../us|r/lib/py|
|000036c0| 74 68 6f 6e 32 2e 36 2f | 64 65 63 69 6d 61 6c 2e |thon2.6/|decimal.|
|000036d0| 70 79 52 1f 00 00 00 55 | 01 00 00 73 1a 00 00 00 |pyR....U|...s....|
|000036e0| 00 01 0c 01 10 01 09 01 | 0d 01 10 01 09 01 10 01 |........|........|
|000036f0| 16 01 0d 01 10 01 09 01 | 10 01 28 04 00 00 00 52 |........|..(....R|
|00003700| 20 00 00 00 52 21 00 00 | 00 52 22 00 00 00 52 1f | ...R!..|.R"...R.|
|00003710| 00 00 00 28 00 00 00 00 | 28 00 00 00 00 28 00 00 |...(....|(....(..|
|00003720| 00 00 73 1d 00 00 00 2f | 75 73 72 2f 6c 69 62 2f |..s..../|usr/lib/|
|00003730| 70 79 74 68 6f 6e 32 2e | 36 2f 64 65 63 69 6d 61 |python2.|6/decima|
|00003740| 6c 2e 70 79 52 0c 00 00 | 00 3f 01 00 00 73 04 00 |l.pyR...|.?...s..|
|00003750| 00 00 06 14 06 02 63 00 | 00 00 00 00 00 00 00 01 |......c.|........|
|00003760| 00 00 00 42 00 00 00 73 | 0e 00 00 00 65 00 00 5a |...B...s|....e..Z|
|00003770| 01 00 64 00 00 5a 02 00 | 52 53 28 01 00 00 00 73 |..d..Z..|RS(....s|
|00003780| 78 02 00 00 4e 75 6d 65 | 72 69 63 61 6c 20 75 6e |x...Nume|rical un|
|00003790| 64 65 72 66 6c 6f 77 20 | 77 69 74 68 20 72 65 73 |derflow |with res|
|000037a0| 75 6c 74 20 72 6f 75 6e | 64 65 64 20 74 6f 20 30 |ult roun|ded to 0|
|000037b0| 2e 0a 0a 20 20 20 20 54 | 68 69 73 20 6f 63 63 75 |... T|his occu|
|000037c0| 72 73 20 61 6e 64 20 73 | 69 67 6e 61 6c 73 20 75 |rs and s|ignals u|
|000037d0| 6e 64 65 72 66 6c 6f 77 | 20 69 66 20 61 20 72 65 |nderflow| if a re|
|000037e0| 73 75 6c 74 20 69 73 20 | 69 6e 65 78 61 63 74 20 |sult is |inexact |
|000037f0| 61 6e 64 20 74 68 65 0a | 20 20 20 20 61 64 6a 75 |and the.| adju|
|00003800| 73 74 65 64 20 65 78 70 | 6f 6e 65 6e 74 20 6f 66 |sted exp|onent of|
|00003810| 20 74 68 65 20 72 65 73 | 75 6c 74 20 77 6f 75 6c | the res|ult woul|
|00003820| 64 20 62 65 20 73 6d 61 | 6c 6c 65 72 20 28 6d 6f |d be sma|ller (mo|
|00003830| 72 65 20 6e 65 67 61 74 | 69 76 65 29 20 74 68 61 |re negat|ive) tha|
|00003840| 6e 0a 20 20 20 20 74 68 | 65 20 73 6d 61 6c 6c 65 |n. th|e smalle|
|00003850| 73 74 20 76 61 6c 75 65 | 20 74 68 61 74 20 63 61 |st value| that ca|
|00003860| 6e 20 62 65 20 68 61 6e | 64 6c 65 64 20 62 79 20 |n be han|dled by |
|00003870| 74 68 65 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |the impl|ementati|
|00003880| 6f 6e 20 28 74 68 65 20 | 76 61 6c 75 65 0a 20 20 |on (the |value. |
|00003890| 20 20 45 6d 69 6e 29 2e | 20 20 54 68 61 74 20 69 | Emin).| That i|
|000038a0| 73 2c 20 74 68 65 20 72 | 65 73 75 6c 74 20 69 73 |s, the r|esult is|
|000038b0| 20 62 6f 74 68 20 69 6e | 65 78 61 63 74 20 61 6e | both in|exact an|
|000038c0| 64 20 73 75 62 6e 6f 72 | 6d 61 6c 2e 0a 0a 20 20 |d subnor|mal... |
|000038d0| 20 20 54 68 65 20 72 65 | 73 75 6c 74 20 61 66 74 | The re|sult aft|
|000038e0| 65 72 20 61 6e 20 75 6e | 64 65 72 66 6c 6f 77 20 |er an un|derflow |
|000038f0| 77 69 6c 6c 20 62 65 20 | 61 20 73 75 62 6e 6f 72 |will be |a subnor|
|00003900| 6d 61 6c 20 6e 75 6d 62 | 65 72 20 72 6f 75 6e 64 |mal numb|er round|
|00003910| 65 64 2c 20 69 66 0a 20 | 20 20 20 6e 65 63 65 73 |ed, if. | neces|
|00003920| 73 61 72 79 2c 20 73 6f | 20 74 68 61 74 20 69 74 |sary, so| that it|
|00003930| 73 20 65 78 70 6f 6e 65 | 6e 74 20 69 73 20 6e 6f |s expone|nt is no|
|00003940| 74 20 6c 65 73 73 20 74 | 68 61 6e 20 45 74 69 6e |t less t|han Etin|
|00003950| 79 2e 20 20 54 68 69 73 | 20 6d 61 79 20 72 65 73 |y. This| may res|
|00003960| 75 6c 74 0a 20 20 20 20 | 69 6e 20 30 20 77 69 74 |ult. |in 0 wit|
|00003970| 68 20 74 68 65 20 73 69 | 67 6e 20 6f 66 20 74 68 |h the si|gn of th|
|00003980| 65 20 69 6e 74 65 72 6d | 65 64 69 61 74 65 20 72 |e interm|ediate r|
|00003990| 65 73 75 6c 74 20 61 6e | 64 20 61 6e 20 65 78 70 |esult an|d an exp|
|000039a0| 6f 6e 65 6e 74 20 6f 66 | 20 45 74 69 6e 79 2e 0a |onent of| Etiny..|
|000039b0| 0a 20 20 20 20 49 6e 20 | 61 6c 6c 20 63 61 73 65 |. In |all case|
|000039c0| 73 2c 20 49 6e 65 78 61 | 63 74 2c 20 52 6f 75 6e |s, Inexa|ct, Roun|
|000039d0| 64 65 64 2c 20 61 6e 64 | 20 53 75 62 6e 6f 72 6d |ded, and| Subnorm|
|000039e0| 61 6c 20 77 69 6c 6c 20 | 61 6c 73 6f 20 62 65 20 |al will |also be |
|000039f0| 72 61 69 73 65 64 2e 0a | 20 20 20 20 28 03 00 00 |raised..| (...|
|00003a00| 00 52 20 00 00 00 52 21 | 00 00 00 52 22 00 00 00 |.R ...R!|...R"...|
|00003a10| 28 00 00 00 00 28 00 00 | 00 00 28 00 00 00 00 73 |(....(..|..(....s|
|00003a20| 1d 00 00 00 2f 75 73 72 | 2f 6c 69 62 2f 70 79 74 |..../usr|/lib/pyt|
|00003a30| 68 6f 6e 32 2e 36 2f 64 | 65 63 69 6d 61 6c 2e 70 |hon2.6/d|ecimal.p|
|00003a40| 79 52 0d 00 00 00 65 01 | 00 00 73 02 00 00 00 06 |yR....e.|..s.....|
|00003a50| 0d 74 0d 00 00 00 4d 6f | 63 6b 54 68 72 65 61 64 |.t....Mo|ckThread|
|00003a60| 69 6e 67 63 00 00 00 00 | 00 00 00 00 02 00 00 00 |ingc....|........|
|00003a70| 42 00 00 00 73 14 00 00 | 00 65 00 00 5a 01 00 65 |B...s...|.e..Z..e|
|00003a80| 02 00 64 00 00 84 01 00 | 5a 03 00 52 53 28 01 00 |..d.....|Z..RS(..|
|00003a90| 00 00 63 02 00 00 00 02 | 00 00 00 02 00 00 00 43 |..c.....|.......C|
|00003aa0| 00 00 00 73 0b 00 00 00 | 7c 01 00 69 00 00 74 01 |...s....||..i..t.|
|00003ab0| 00 19 53 28 01 00 00 00 | 4e 28 02 00 00 00 74 07 |..S(....|N(....t.|
|00003ac0| 00 00 00 6d 6f 64 75 6c | 65 73 52 20 00 00 00 28 |...modul|esR ...(|
|00003ad0| 02 00 00 00 52 1d 00 00 | 00 74 03 00 00 00 73 79 |....R...|.t....sy|
|00003ae0| 73 28 00 00 00 00 28 00 | 00 00 00 73 1d 00 00 00 |s(....(.|...s....|
|00003af0| 2f 75 73 72 2f 6c 69 62 | 2f 70 79 74 68 6f 6e 32 |/usr/lib|/python2|
|00003b00| 2e 36 2f 64 65 63 69 6d | 61 6c 2e 70 79 74 05 00 |.6/decim|al.pyt..|
|00003b10| 00 00 6c 6f 63 61 6c 8c | 01 00 00 73 02 00 00 00 |..local.|...s....|
|00003b20| 00 01 28 04 00 00 00 52 | 20 00 00 00 52 21 00 00 |..(....R| ...R!..|
|00003b30| 00 52 37 00 00 00 52 38 | 00 00 00 28 00 00 00 00 |.R7...R8|...(....|
|00003b40| 28 00 00 00 00 28 00 00 | 00 00 73 1d 00 00 00 2f |(....(..|..s..../|
|00003b50| 75 73 72 2f 6c 69 62 2f | 70 79 74 68 6f 6e 32 2e |usr/lib/|python2.|
|00003b60| 36 2f 64 65 63 69 6d 61 | 6c 2e 70 79 52 35 00 00 |6/decima|l.pyR5..|
|00003b70| 00 8b 01 00 00 73 02 00 | 00 00 06 01 74 13 00 00 |.....s..|....t...|
|00003b80| 00 5f 5f 64 65 63 69 6d | 61 6c 5f 63 6f 6e 74 65 |.__decim|al_conte|
|00003b90| 78 74 5f 5f 63 01 00 00 | 00 01 00 00 00 04 00 00 |xt__c...|........|
|00003ba0| 00 43 00 00 00 73 43 00 | 00 00 7c 00 00 74 00 00 |.C...sC.|..|..t..|
|00003bb0| 74 01 00 74 02 00 66 03 | 00 6a 06 00 6f 1a 00 01 |t..t..f.|.j..o...|
|00003bc0| 7c 00 00 69 03 00 83 00 | 00 7d 00 00 7c 00 00 69 ||..i....|.}..|..i|
|00003bd0| 04 00 83 00 00 01 6e 01 | 00 01 7c 00 00 74 05 00 |......n.|..|..t..|
|00003be0| 69 06 00 83 00 00 5f 07 | 00 64 01 00 53 28 02 00 |i....._.|.d..S(..|
|00003bf0| 00 00 73 25 00 00 00 53 | 65 74 20 74 68 69 73 20 |..s%...S|et this |
|00003c00| 74 68 72 65 61 64 27 73 | 20 63 6f 6e 74 65 78 74 |thread's| context|
|00003c10| 20 74 6f 20 63 6f 6e 74 | 65 78 74 2e 4e 28 08 00 | to cont|ext.N(..|
|00003c20| 00 00 52 02 00 00 00 52 | 03 00 00 00 52 04 00 00 |..R....R|....R...|
|00003c30| 00 74 04 00 00 00 63 6f | 70 79 74 0b 00 00 00 63 |.t....co|pyt....c|
|00003c40| 6c 65 61 72 5f 66 6c 61 | 67 73 74 09 00 00 00 74 |lear_fla|gst....t|
|00003c50| 68 72 65 61 64 69 6e 67 | 74 0d 00 00 00 63 75 72 |hreading|t....cur|
|00003c60| 72 65 6e 74 54 68 72 65 | 61 64 52 39 00 00 00 28 |rentThre|adR9...(|
|00003c70| 01 00 00 00 52 1e 00 00 | 00 28 00 00 00 00 28 00 |....R...|.(....(.|
|00003c80| 00 00 00 73 1d 00 00 00 | 2f 75 73 72 2f 6c 69 62 |...s....|/usr/lib|
|00003c90| 2f 70 79 74 68 6f 6e 32 | 2e 36 2f 64 65 63 69 6d |/python2|.6/decim|
|00003ca0| 61 6c 2e 70 79 52 16 00 | 00 00 9b 01 00 00 73 08 |al.pyR..|......s.|
|00003cb0| 00 00 00 00 02 16 01 0c | 01 0e 01 63 00 00 00 00 |........|...c....|
|00003cc0| 01 00 00 00 05 00 00 00 | 43 00 00 00 73 44 00 00 |........|C...sD..|
|00003cd0| 00 79 11 00 74 00 00 69 | 01 00 83 00 00 69 02 00 |.y..t..i|.....i..|
|00003ce0| 53 57 6e 2c 00 04 74 03 | 00 6a 0a 00 6f 20 00 01 |SWn,..t.|.j..o ..|
|00003cf0| 01 01 01 74 04 00 83 00 | 00 7d 00 00 7c 00 00 74 |...t....|.}..|..t|
|00003d00| 00 00 69 01 00 83 00 00 | 5f 02 00 7c 00 00 53 01 |..i.....|_..|..S.|
|00003d10| 58 64 01 00 53 28 02 00 | 00 00 73 cd 00 00 00 52 |Xd..S(..|..s....R|
|00003d20| 65 74 75 72 6e 73 20 74 | 68 69 73 20 74 68 72 65 |eturns t|his thre|
|00003d30| 61 64 27 73 20 63 6f 6e | 74 65 78 74 2e 0a 0a 20 |ad's con|text... |
|00003d40| 20 20 20 20 20 20 20 49 | 66 20 74 68 69 73 20 74 | I|f this t|
|00003d50| 68 72 65 61 64 20 64 6f | 65 73 20 6e 6f 74 20 79 |hread do|es not y|
|00003d60| 65 74 20 68 61 76 65 20 | 61 20 63 6f 6e 74 65 78 |et have |a contex|
|00003d70| 74 2c 20 72 65 74 75 72 | 6e 73 0a 20 20 20 20 20 |t, retur|ns. |
|00003d80| 20 20 20 61 20 6e 65 77 | 20 63 6f 6e 74 65 78 74 | a new| context|
|00003d90| 20 61 6e 64 20 73 65 74 | 73 20 74 68 69 73 20 74 | and set|s this t|
|00003da0| 68 72 65 61 64 27 73 20 | 63 6f 6e 74 65 78 74 2e |hread's |context.|
|00003db0| 0a 20 20 20 20 20 20 20 | 20 4e 65 77 20 63 6f 6e |. | New con|
|00003dc0| 74 65 78 74 73 20 61 72 | 65 20 63 6f 70 69 65 73 |texts ar|e copies|
|00003dd0| 20 6f 66 20 44 65 66 61 | 75 6c 74 43 6f 6e 74 65 | of Defa|ultConte|
|00003de0| 78 74 2e 0a 20 20 20 20 | 20 20 20 20 4e 28 05 00 |xt.. | N(..|
|00003df0| 00 00 52 3c 00 00 00 52 | 3d 00 00 00 52 39 00 00 |..R<...R|=...R9..|
|00003e00| 00 74 0e 00 00 00 41 74 | 74 72 69 62 75 74 65 45 |.t....At|tributeE|
|00003e10| 72 72 6f 72 52 01 00 00 | 00 28 01 00 00 00 52 1e |rrorR...|.(....R.|
|00003e20| 00 00 00 28 00 00 00 00 | 28 00 00 00 00 73 1d 00 |...(....|(....s..|
|00003e30| 00 00 2f 75 73 72 2f 6c | 69 62 2f 70 79 74 68 6f |../usr/l|ib/pytho|
|00003e40| 6e 32 2e 36 2f 64 65 63 | 69 6d 61 6c 2e 70 79 52 |n2.6/dec|imal.pyR|
|00003e50| 17 00 00 00 a2 01 00 00 | 73 0c 00 00 00 00 07 03 |........|s.......|
|00003e60| 01 11 01 0e 01 09 01 0f | 01 63 01 00 00 00 02 00 |........|.c......|
|00003e70| 00 00 05 00 00 00 43 00 | 00 00 73 38 00 00 00 79 |......C.|..s8...y|
|00003e80| 0b 00 7c 00 00 69 00 00 | 53 57 6e 26 00 04 74 01 |..|..i..|SWn&..t.|
|00003e90| 00 6a 0a 00 6f 1a 00 01 | 01 01 01 74 02 00 83 00 |.j..o...|...t....|
|00003ea0| 00 7d 01 00 7c 01 00 7c | 00 00 5f 00 00 7c 01 00 |.}..|..||.._..|..|
|00003eb0| 53 01 58 64 01 00 53 28 | 02 00 00 00 73 cd 00 00 |S.Xd..S(|....s...|
|00003ec0| 00 52 65 74 75 72 6e 73 | 20 74 68 69 73 20 74 68 |.Returns| this th|
|00003ed0| 72 65 61 64 27 73 20 63 | 6f 6e 74 65 78 74 2e 0a |read's c|ontext..|
|00003ee0| 0a 20 20 20 20 20 20 20 | 20 49 66 20 74 68 69 73 |. | If this|
|00003ef0| 20 74 68 72 65 61 64 20 | 64 6f 65 73 20 6e 6f 74 | thread |does not|
|00003f00| 20 79 65 74 20 68 61 76 | 65 20 61 20 63 6f 6e 74 | yet hav|e a cont|
|00003f10| 65 78 74 2c 20 72 65 74 | 75 72 6e 73 0a 20 20 20 |ext, ret|urns. |
|00003f20| 20 20 20 20 20 61 20 6e | 65 77 20 63 6f 6e 74 65 | a n|ew conte|
|00003f30| 78 74 20 61 6e 64 20 73 | 65 74 73 20 74 68 69 73 |xt and s|ets this|
|00003f40| 20 74 68 72 65 61 64 27 | 73 20 63 6f 6e 74 65 78 | thread'|s contex|
|00003f50| 74 2e 0a 20 20 20 20 20 | 20 20 20 4e 65 77 20 63 |t.. | New c|
|00003f60| 6f 6e 74 65 78 74 73 20 | 61 72 65 20 63 6f 70 69 |ontexts |are copi|
|00003f70| 65 73 20 6f 66 20 44 65 | 66 61 75 6c 74 43 6f 6e |es of De|faultCon|
|00003f80| 74 65 78 74 2e 0a 20 20 | 20 20 20 20 20 20 4e 28 |text.. | N(|
|00003f90| 03 00 00 00 52 39 00 00 | 00 52 3e 00 00 00 52 01 |....R9..|.R>...R.|
|00003fa0| 00 00 00 28 02 00 00 00 | 74 06 00 00 00 5f 6c 6f |...(....|t...._lo|
|00003fb0| 63 61 6c 52 1e 00 00 00 | 28 00 00 00 00 28 00 00 |calR....|(....(..|
|00003fc0| 00 00 73 1d 00 00 00 2f | 75 73 72 2f 6c 69 62 2f |..s..../|usr/lib/|
|00003fd0| 70 79 74 68 6f 6e 32 2e | 36 2f 64 65 63 69 6d 61 |python2.|6/decima|
|00003fe0| 6c 2e 70 79 52 17 00 00 | 00 b6 01 00 00 73 0c 00 |l.pyR...|.....s..|
|00003ff0| 00 00 00 07 03 01 0b 01 | 0e 01 09 01 09 01 63 02 |........|......c.|
|00004000| 00 00 00 02 00 00 00 04 | 00 00 00 43 00 00 00 73 |........|...C...s|
|00004010| 3d 00 00 00 7c 00 00 74 | 00 00 74 01 00 74 02 00 |=...|..t|..t..t..|
|00004020| 66 03 00 6a 06 00 6f 1a | 00 01 7c 00 00 69 03 00 |f..j..o.|..|..i..|
|00004030| 83 00 00 7d 00 00 7c 00 | 00 69 04 00 83 00 00 01 |...}..|.|.i......|
|00004040| 6e 01 00 01 7c 00 00 7c | 01 00 5f 05 00 64 01 00 |n...|..||.._..d..|
|00004050| 53 28 02 00 00 00 73 25 | 00 00 00 53 65 74 20 74 |S(....s%|...Set t|
|00004060| 68 69 73 20 74 68 72 65 | 61 64 27 73 20 63 6f 6e |his thre|ad's con|
|00004070| 74 65 78 74 20 74 6f 20 | 63 6f 6e 74 65 78 74 2e |text to |context.|
|00004080| 4e 28 06 00 00 00 52 02 | 00 00 00 52 03 00 00 00 |N(....R.|...R....|
|00004090| 52 04 00 00 00 52 3a 00 | 00 00 52 3b 00 00 00 52 |R....R:.|..R;...R|
|000040a0| 39 00 00 00 28 02 00 00 | 00 52 1e 00 00 00 52 3f |9...(...|.R....R?|
|000040b0| 00 00 00 28 00 00 00 00 | 28 00 00 00 00 73 1d 00 |...(....|(....s..|
|000040c0| 00 00 2f 75 73 72 2f 6c | 69 62 2f 70 79 74 68 6f |../usr/l|ib/pytho|
|000040d0| 6e 32 2e 36 2f 64 65 63 | 69 6d 61 6c 2e 70 79 52 |n2.6/dec|imal.pyR|
|000040e0| 16 00 00 00 c4 01 00 00 | 73 08 00 00 00 00 02 16 |........|s.......|
|000040f0| 01 0c 01 0e 01 63 01 00 | 00 00 01 00 00 00 02 00 |.....c..|........|
|00004100| 00 00 43 00 00 00 73 24 | 00 00 00 7c 00 00 64 01 |..C...s$|...|..d.|
|00004110| 00 6a 08 00 6f 0d 00 01 | 74 01 00 83 00 00 7d 00 |.j..o...|t.....}.|
|00004120| 00 6e 01 00 01 74 02 00 | 7c 00 00 83 01 00 53 28 |.n...t..||.....S(|
|00004130| 02 00 00 00 73 5e 04 00 | 00 52 65 74 75 72 6e 20 |....s^..|.Return |
|00004140| 61 20 63 6f 6e 74 65 78 | 74 20 6d 61 6e 61 67 65 |a contex|t manage|
|00004150| 72 20 66 6f 72 20 61 20 | 63 6f 70 79 20 6f 66 20 |r for a |copy of |
|00004160| 74 68 65 20 73 75 70 70 | 6c 69 65 64 20 63 6f 6e |the supp|lied con|
|00004170| 74 65 78 74 0a 0a 20 20 | 20 20 55 73 65 73 20 61 |text.. | Uses a|
|00004180| 20 63 6f 70 79 20 6f 66 | 20 74 68 65 20 63 75 72 | copy of| the cur|
|00004190| 72 65 6e 74 20 63 6f 6e | 74 65 78 74 20 69 66 20 |rent con|text if |
|000041a0| 6e 6f 20 63 6f 6e 74 65 | 78 74 20 69 73 20 73 70 |no conte|xt is sp|
|000041b0| 65 63 69 66 69 65 64 0a | 20 20 20 20 54 68 65 20 |ecified.| The |
|000041c0| 72 65 74 75 72 6e 65 64 | 20 63 6f 6e 74 65 78 74 |returned| context|
|000041d0| 20 6d 61 6e 61 67 65 72 | 20 63 72 65 61 74 65 73 | manager| creates|
|000041e0| 20 61 20 6c 6f 63 61 6c | 20 64 65 63 69 6d 61 6c | a local| decimal|
|000041f0| 20 63 6f 6e 74 65 78 74 | 0a 20 20 20 20 69 6e 20 | context|. in |
|00004200| 61 20 77 69 74 68 20 73 | 74 61 74 65 6d 65 6e 74 |a with s|tatement|
|00004210| 3a 0a 20 20 20 20 20 20 | 20 20 64 65 66 20 73 69 |:. | def si|
|00004220| 6e 28 78 29 3a 0a 20 20 | 20 20 20 20 20 20 20 20 |n(x):. | |
|00004230| 20 20 20 77 69 74 68 20 | 6c 6f 63 61 6c 63 6f 6e | with |localcon|
|00004240| 74 65 78 74 28 29 20 61 | 73 20 63 74 78 3a 0a 20 |text() a|s ctx:. |
|00004250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004260| 63 74 78 2e 70 72 65 63 | 20 2b 3d 20 32 0a 20 20 |ctx.prec| += 2. |
|00004270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 23 | | #|
|00004280| 20 52 65 73 74 20 6f 66 | 20 73 69 6e 20 63 61 6c | Rest of| sin cal|
|00004290| 63 75 6c 61 74 69 6f 6e | 20 61 6c 67 6f 72 69 74 |culation| algorit|
|000042a0| 68 6d 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |hm. | |
|000042b0| 20 20 20 20 23 20 75 73 | 65 73 20 61 20 70 72 65 | # us|es a pre|
|000042c0| 63 69 73 69 6f 6e 20 32 | 20 67 72 65 61 74 65 72 |cision 2| greater|
|000042d0| 20 74 68 61 6e 20 6e 6f | 72 6d 61 6c 0a 20 20 20 | than no|rmal. |
|000042e0| 20 20 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e | | return|
|000042f0| 20 2b 73 20 20 23 20 43 | 6f 6e 76 65 72 74 20 72 | +s # C|onvert r|
|00004300| 65 73 75 6c 74 20 74 6f | 20 6e 6f 72 6d 61 6c 20 |esult to| normal |
|00004310| 70 72 65 63 69 73 69 6f | 6e 0a 0a 20 20 20 20 20 |precisio|n.. |
|00004320| 20 20 20 20 64 65 66 20 | 73 69 6e 28 78 29 3a 0a | def |sin(x):.|
|00004330| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 77 69 74 | | wit|
|00004340| 68 20 6c 6f 63 61 6c 63 | 6f 6e 74 65 78 74 28 45 |h localc|ontext(E|
|00004350| 78 74 65 6e 64 65 64 43 | 6f 6e 74 65 78 74 29 3a |xtendedC|ontext):|
|00004360| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004370| 20 20 23 20 52 65 73 74 | 20 6f 66 20 73 69 6e 20 | # Rest| of sin |
|00004380| 63 61 6c 63 75 6c 61 74 | 69 6f 6e 20 61 6c 67 6f |calculat|ion algo|
|00004390| 72 69 74 68 6d 0a 20 20 | 20 20 20 20 20 20 20 20 |rithm. | |
|000043a0| 20 20 20 20 20 20 20 23 | 20 75 73 65 73 20 74 68 | #| uses th|
|000043b0| 65 20 45 78 74 65 6e 64 | 65 64 20 43 6f 6e 74 65 |e Extend|ed Conte|
|000043c0| 78 74 20 66 72 6f 6d 20 | 74 68 65 0a 20 20 20 20 |xt from |the. |
|000043d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 23 20 47 | | # G|
|000043e0| 65 6e 65 72 61 6c 20 44 | 65 63 69 6d 61 6c 20 41 |eneral D|ecimal A|
|000043f0| 72 69 74 68 6d 65 74 69 | 63 20 53 70 65 63 69 66 |rithmeti|c Specif|
|00004400| 69 63 61 74 69 6f 6e 0a | 20 20 20 20 20 20 20 20 |ication.| |
|00004410| 20 20 20 20 20 72 65 74 | 75 72 6e 20 2b 73 20 20 | ret|urn +s |
|00004420| 23 20 43 6f 6e 76 65 72 | 74 20 72 65 73 75 6c 74 |# Conver|t result|
|00004430| 20 74 6f 20 6e 6f 72 6d | 61 6c 20 63 6f 6e 74 65 | to norm|al conte|
|00004440| 78 74 0a 0a 20 20 20 20 | 3e 3e 3e 20 73 65 74 63 |xt.. |>>> setc|
|00004450| 6f 6e 74 65 78 74 28 44 | 65 66 61 75 6c 74 43 6f |ontext(D|efaultCo|
|00004460| 6e 74 65 78 74 29 0a 20 | 20 20 20 3e 3e 3e 20 70 |ntext). | >>> p|
|00004470| 72 69 6e 74 20 67 65 74 | 63 6f 6e 74 65 78 74 28 |rint get|context(|
|00004480| 29 2e 70 72 65 63 0a 20 | 20 20 20 32 38 0a 20 20 |).prec. | 28. |
|00004490| 20 20 3e 3e 3e 20 77 69 | 74 68 20 6c 6f 63 61 6c | >>> wi|th local|
|000044a0| 63 6f 6e 74 65 78 74 28 | 29 3a 0a 20 20 20 20 2e |context(|):. .|
|000044b0| 2e 2e 20 20 20 20 20 63 | 74 78 20 3d 20 67 65 74 |.. c|tx = get|
|000044c0| 63 6f 6e 74 65 78 74 28 | 29 0a 20 20 20 20 2e 2e |context(|). ..|
|000044d0| 2e 20 20 20 20 20 63 74 | 78 2e 70 72 65 63 20 2b |. ct|x.prec +|
|000044e0| 3d 20 32 0a 20 20 20 20 | 2e 2e 2e 20 20 20 20 20 |= 2. |... |
|000044f0| 70 72 69 6e 74 20 63 74 | 78 2e 70 72 65 63 0a 20 |print ct|x.prec. |
|00004500| 20 20 20 2e 2e 2e 0a 20 | 20 20 20 33 30 0a 20 20 | .... | 30. |
|00004510| 20 20 3e 3e 3e 20 77 69 | 74 68 20 6c 6f 63 61 6c | >>> wi|th local|
|00004520| 63 6f 6e 74 65 78 74 28 | 45 78 74 65 6e 64 65 64 |context(|Extended|
|00004530| 43 6f 6e 74 65 78 74 29 | 3a 0a 20 20 20 20 2e 2e |Context)|:. ..|
|00004540| 2e 20 20 20 20 20 70 72 | 69 6e 74 20 67 65 74 63 |. pr|int getc|
|00004550| 6f 6e 74 65 78 74 28 29 | 2e 70 72 65 63 0a 20 20 |ontext()|.prec. |
|00004560| 20 20 2e 2e 2e 0a 20 20 | 20 20 39 0a 20 20 20 20 | .... | 9. |
|00004570| 3e 3e 3e 20 70 72 69 6e | 74 20 67 65 74 63 6f 6e |>>> prin|t getcon|
|00004580| 74 65 78 74 28 29 2e 70 | 72 65 63 0a 20 20 20 20 |text().p|rec. |
|00004590| 32 38 0a 20 20 20 20 4e | 28 03 00 00 00 74 04 00 |28. N|(....t..|
|000045a0| 00 00 4e 6f 6e 65 52 17 | 00 00 00 74 0f 00 00 00 |..NoneR.|...t....|
|000045b0| 5f 43 6f 6e 74 65 78 74 | 4d 61 6e 61 67 65 72 28 |_Context|Manager(|
|000045c0| 01 00 00 00 74 03 00 00 | 00 63 74 78 28 00 00 00 |....t...|.ctx(...|
|000045d0| 00 28 00 00 00 00 73 1d | 00 00 00 2f 75 73 72 2f |.(....s.|.../usr/|
|000045e0| 6c 69 62 2f 70 79 74 68 | 6f 6e 32 2e 36 2f 64 65 |lib/pyth|on2.6/de|
|000045f0| 63 69 6d 61 6c 2e 70 79 | 52 18 00 00 00 cd 01 00 |cimal.py|R.......|
|00004600| 00 73 06 00 00 00 00 24 | 0d 00 0d 01 63 00 00 00 |.s.....$|....c...|
|00004610| 00 00 00 00 00 04 00 00 | 00 42 00 00 00 73 21 05 |........|.B...s!.|
|00004620| 00 00 65 00 00 5a 01 00 | 64 00 00 5a 02 00 64 78 |..e..Z..|d..Z..dx|
|00004630| 00 5a 03 00 64 05 00 64 | 79 00 64 06 00 84 02 00 |.Z..d..d|y.d.....|
|00004640| 5a 05 00 64 07 00 84 00 | 00 5a 06 00 64 08 00 84 |Z..d....|.Z..d...|
|00004650| 00 00 5a 07 00 64 79 00 | 64 79 00 64 09 00 84 02 |..Z..dy.|dy.d....|
|00004660| 00 5a 08 00 64 0a 00 84 | 00 00 5a 09 00 64 0b 00 |.Z..d...|..Z..d..|
|00004670| 84 00 00 5a 0a 00 64 0c | 00 84 00 00 5a 0b 00 64 |...Z..d.|....Z..d|
|00004680| 0d 00 84 00 00 5a 0c 00 | 64 0e 00 84 00 00 5a 0d |.....Z..|d.....Z.|
|00004690| 00 64 79 00 64 0f 00 84 | 01 00 5a 0e 00 64 79 00 |.dy.d...|..Z..dy.|
|000046a0| 64 10 00 84 01 00 5a 0f | 00 64 79 00 64 11 00 84 |d.....Z.|.dy.d...|
|000046b0| 01 00 5a 10 00 64 79 00 | 64 12 00 84 01 00 5a 11 |..Z..dy.|d.....Z.|
|000046c0| 00 64 79 00 64 13 00 84 | 01 00 5a 12 00 64 14 00 |.dy.d...|..Z..d..|
|000046d0| 84 00 00 5a 13 00 64 15 | 00 84 00 00 5a 14 00 64 |...Z..d.|....Z..d|
|000046e0| 16 00 84 00 00 5a 15 00 | 65 16 00 64 79 00 64 17 |.....Z..|e..dy.d.|
|000046f0| 00 84 02 00 5a 17 00 64 | 79 00 64 18 00 84 01 00 |....Z..d|y.d.....|
|00004700| 5a 18 00 64 79 00 64 19 | 00 84 01 00 5a 19 00 64 |Z..dy.d.|....Z..d|
|00004710| 79 00 64 1a 00 84 01 00 | 5a 1a 00 65 1b 00 64 79 |y.d.....|Z..e..dy|
|00004720| 00 64 1b 00 84 02 00 5a | 1c 00 64 79 00 64 1c 00 |.d.....Z|..dy.d..|
|00004730| 84 01 00 5a 1d 00 65 1d | 00 5a 1e 00 64 79 00 64 |...Z..e.|.Z..dy.d|
|00004740| 1d 00 84 01 00 5a 1f 00 | 64 79 00 64 1e 00 84 01 |.....Z..|dy.d....|
|00004750| 00 5a 20 00 64 79 00 64 | 1f 00 84 01 00 5a 21 00 |.Z .dy.d|.....Z!.|
|00004760| 65 21 00 5a 22 00 64 79 | 00 64 20 00 84 01 00 5a |e!.Z".dy|.d ....Z|
|00004770| 23 00 64 21 00 84 00 00 | 5a 24 00 64 79 00 64 22 |#.d!....|Z$.dy.d"|
|00004780| 00 84 01 00 5a 25 00 65 | 23 00 5a 26 00 65 25 00 |....Z%.e|#.Z&.e%.|
|00004790| 5a 27 00 64 79 00 64 23 | 00 84 01 00 5a 28 00 64 |Z'.dy.d#|....Z(.d|
|000047a0| 79 00 64 24 00 84 01 00 | 5a 29 00 64 79 00 64 25 |y.d$....|Z).dy.d%|
|000047b0| 00 84 01 00 5a 2a 00 64 | 79 00 64 26 00 84 01 00 |....Z*.d|y.d&....|
|000047c0| 5a 2b 00 64 79 00 64 27 | 00 84 01 00 5a 2c 00 64 |Z+.dy.d'|....Z,.d|
|000047d0| 79 00 64 28 00 84 01 00 | 5a 2d 00 64 79 00 64 29 |y.d(....|Z-.dy.d)|
|000047e0| 00 84 01 00 5a 2e 00 64 | 2a 00 84 00 00 5a 2f 00 |....Z..d|*....Z/.|
|000047f0| 64 2b 00 84 00 00 5a 30 | 00 65 30 00 5a 31 00 64 |d+....Z0|.e0.Z1.d|
|00004800| 2c 00 84 00 00 5a 32 00 | 65 33 00 65 32 00 83 01 |,....Z2.|e3.e2...|
|00004810| 00 5a 32 00 64 2d 00 84 | 00 00 5a 34 00 65 33 00 |.Z2.d-..|..Z4.e3.|
|00004820| 65 34 00 83 01 00 5a 34 | 00 64 2e 00 84 00 00 5a |e4....Z4|.d.....Z|
|00004830| 35 00 64 2f 00 84 00 00 | 5a 36 00 64 30 00 84 00 |5.d/....|Z6.d0...|
|00004840| 00 5a 37 00 64 31 00 84 | 00 00 5a 38 00 64 32 00 |.Z7.d1..|..Z8.d2.|
|00004850| 84 00 00 5a 39 00 68 00 | 00 5a 3a 00 64 33 00 84 |...Z9.h.|.Z:.d3..|
|00004860| 00 00 5a 3b 00 64 34 00 | 84 00 00 5a 3c 00 64 35 |..Z;.d4.|...Z<.d5|
|00004870| 00 84 00 00 5a 3d 00 64 | 36 00 84 00 00 5a 3e 00 |....Z=.d|6....Z>.|
|00004880| 64 37 00 84 00 00 5a 3f | 00 64 38 00 84 00 00 5a |d7....Z?|.d8....Z|
|00004890| 40 00 64 39 00 84 00 00 | 5a 41 00 64 3a 00 84 00 |@.d9....|ZA.d:...|
|000048a0| 00 5a 42 00 64 79 00 64 | 3b 00 84 01 00 5a 43 00 |.ZB.dy.d|;....ZC.|
|000048b0| 64 79 00 64 3c 00 84 01 | 00 5a 44 00 64 3d 00 84 |dy.d<...|.ZD.d=..|
|000048c0| 00 00 5a 45 00 64 79 00 | 64 79 00 64 3e 00 84 02 |..ZE.dy.|dy.d>...|
|000048d0| 00 5a 46 00 64 79 00 64 | 3f 00 84 01 00 5a 47 00 |.ZF.dy.d|?....ZG.|
|000048e0| 64 79 00 64 40 00 84 01 | 00 5a 48 00 64 79 00 64 |dy.d@...|.ZH.dy.d|
|000048f0| 79 00 65 1b 00 64 41 00 | 84 03 00 5a 49 00 64 42 |y.e..dA.|...ZI.dB|
|00004900| 00 84 00 00 5a 4a 00 64 | 43 00 84 00 00 5a 4b 00 |....ZJ.d|C....ZK.|
|00004910| 64 44 00 84 00 00 5a 4c | 00 64 79 00 64 79 00 64 |dD....ZL|.dy.dy.d|
|00004920| 45 00 84 02 00 5a 4d 00 | 64 79 00 64 79 00 64 46 |E....ZM.|dy.dy.dF|
|00004930| 00 84 02 00 5a 4e 00 65 | 4e 00 5a 4f 00 64 79 00 |....ZN.e|N.ZO.dy.|
|00004940| 64 47 00 84 01 00 5a 50 | 00 64 79 00 64 48 00 84 |dG....ZP|.dy.dH..|
|00004950| 01 00 5a 51 00 64 79 00 | 64 49 00 84 01 00 5a 52 |..ZQ.dy.|dI....ZR|
|00004960| 00 64 4a 00 84 00 00 5a | 53 00 64 4b 00 84 00 00 |.dJ....Z|S.dK....|
|00004970| 5a 54 00 64 4c 00 84 00 | 00 5a 55 00 64 79 00 64 |ZT.dL...|.ZU.dy.d|
|00004980| 4d 00 84 01 00 5a 56 00 | 64 79 00 64 4e 00 84 01 |M....ZV.|dy.dN...|
|00004990| 00 5a 57 00 64 4f 00 84 | 00 00 5a 58 00 64 50 00 |.ZW.dO..|..ZX.dP.|
|000049a0| 84 00 00 5a 59 00 64 51 | 00 84 00 00 5a 5a 00 64 |...ZY.dQ|....ZZ.d|
|000049b0| 52 00 84 00 00 5a 5b 00 | 64 53 00 84 00 00 5a 5c |R....Z[.|dS....Z\|
|000049c0| 00 64 79 00 64 54 00 84 | 01 00 5a 5d 00 64 55 00 |.dy.dT..|..Z].dU.|
|000049d0| 84 00 00 5a 5e 00 64 56 | 00 84 00 00 5a 5f 00 64 |...Z^.dV|....Z_.d|
|000049e0| 57 00 84 00 00 5a 60 00 | 64 58 00 84 00 00 5a 61 |W....Z`.|dX....Za|
|000049f0| 00 64 79 00 64 59 00 84 | 01 00 5a 62 00 64 5a 00 |.dy.dY..|..Zb.dZ.|
|00004a00| 84 00 00 5a 63 00 64 5b | 00 84 00 00 5a 64 00 64 |...Zc.d[|....Zd.d|
|00004a10| 5c 00 84 00 00 5a 65 00 | 64 79 00 64 5d 00 84 01 |\....Ze.|dy.d]...|
|00004a20| 00 5a 66 00 64 5e 00 84 | 00 00 5a 67 00 64 5f 00 |.Zf.d^..|..Zg.d_.|
|00004a30| 84 00 00 5a 68 00 64 79 | 00 64 60 00 84 01 00 5a |...Zh.dy|.d`....Z|
|00004a40| 69 00 64 61 00 84 00 00 | 5a 6a 00 64 79 00 64 62 |i.da....|Zj.dy.db|
|00004a50| 00 84 01 00 5a 6b 00 64 | 79 00 64 63 00 84 01 00 |....Zk.d|y.dc....|
|00004a60| 5a 6c 00 64 64 00 84 00 | 00 5a 6d 00 64 65 00 84 |Zl.dd...|.Zm.de..|
|00004a70| 00 00 5a 6e 00 64 79 00 | 64 66 00 84 01 00 5a 6f |..Zn.dy.|df....Zo|
|00004a80| 00 64 79 00 64 67 00 84 | 01 00 5a 70 00 64 79 00 |.dy.dg..|..Zp.dy.|
|00004a90| 64 68 00 84 01 00 5a 71 | 00 64 79 00 64 69 00 84 |dh....Zq|.dy.di..|
|00004aa0| 01 00 5a 72 00 64 79 00 | 64 6a 00 84 01 00 5a 73 |..Zr.dy.|dj....Zs|
|00004ab0| 00 64 79 00 64 6b 00 84 | 01 00 5a 74 00 64 79 00 |.dy.dk..|..Zt.dy.|
|00004ac0| 64 6c 00 84 01 00 5a 75 | 00 64 79 00 64 6d 00 84 |dl....Zu|.dy.dm..|
|00004ad0| 01 00 5a 76 00 64 79 00 | 64 6e 00 84 01 00 5a 77 |..Zv.dy.|dn....Zw|
|00004ae0| 00 64 79 00 64 6f 00 84 | 01 00 5a 78 00 64 70 00 |.dy.do..|..Zx.dp.|
|00004af0| 84 00 00 5a 79 00 64 79 | 00 64 71 00 84 01 00 5a |...Zy.dy|.dq....Z|
|00004b00| 7a 00 64 79 00 64 72 00 | 84 01 00 5a 7b 00 64 79 |z.dy.dr.|...Z{.dy|
|00004b10| 00 64 73 00 84 01 00 5a | 7c 00 64 74 00 84 00 00 |.ds....Z||.dt....|
|00004b20| 5a 7d 00 64 75 00 84 00 | 00 5a 7e 00 64 76 00 84 |Z}.du...|.Z~.dv..|
|00004b30| 00 00 5a 7f 00 64 79 00 | 64 77 00 84 01 00 5a 80 |..Z..dy.|dw....Z.|
|00004b40| 00 52 53 28 7a 00 00 00 | 73 2c 00 00 00 46 6c 6f |.RS(z...|s,...Flo|
|00004b50| 61 74 69 6e 67 20 70 6f | 69 6e 74 20 63 6c 61 73 |ating po|int clas|
|00004b60| 73 20 66 6f 72 20 64 65 | 63 69 6d 61 6c 20 61 72 |s for de|cimal ar|
|00004b70| 69 74 68 6d 65 74 69 63 | 2e 74 04 00 00 00 5f 65 |ithmetic|.t...._e|
|00004b80| 78 70 52 26 00 00 00 52 | 25 00 00 00 74 0b 00 00 |xpR&...R|%...t...|
|00004b90| 00 5f 69 73 5f 73 70 65 | 63 69 61 6c 74 01 00 00 |._is_spe|cialt...|
|00004ba0| 00 30 63 03 00 00 00 0b | 00 00 00 06 00 00 00 43 |.0c.....|.......C|
|00004bb0| 00 00 00 73 f3 04 00 00 | 74 00 00 69 01 00 7c 00 |...s....|t..i..|.|
|00004bc0| 00 83 01 00 7d 03 00 74 | 02 00 7c 01 00 74 03 00 |....}..t|..|..t..|
|00004bd0| 83 02 00 6f bb 01 01 74 | 04 00 7c 01 00 69 05 00 |...o...t|..|..i..|
|00004be0| 83 00 00 83 01 00 7d 04 | 00 7c 04 00 64 1a 00 6a |......}.|.|..d..j|
|00004bf0| 08 00 6f 2f 00 01 7c 02 | 00 64 1a 00 6a 08 00 6f |..o/..|.|.d..j..o|
|00004c00| 0d 00 01 74 07 00 83 00 | 00 7d 02 00 6e 01 00 01 |...t....|.}..n...|
|00004c10| 7c 02 00 69 08 00 74 09 | 00 64 01 00 7c 01 00 16 ||..i..t.|.d..|...|
|00004c20| 83 02 00 53 01 7c 04 00 | 69 0a 00 64 02 00 83 01 |...S.|..|i..d....|
|00004c30| 00 64 03 00 6a 02 00 6f | 0d 00 01 64 04 00 7c 03 |.d..j..o|...d..|.|
|00004c40| 00 5f 0b 00 6e 0a 00 01 | 64 05 00 7c 03 00 5f 0b |._..n...|d..|.._.|
|00004c50| 00 7c 04 00 69 0a 00 64 | 06 00 83 01 00 7d 05 00 |.|..i..d|.....}..|
|00004c60| 7c 05 00 64 1a 00 6a 09 | 00 6f a7 00 01 7c 04 00 ||..d..j.|.o...|..|
|00004c70| 69 0a 00 64 07 00 83 01 | 00 7d 06 00 74 0c 00 7c |i..d....|.}..t..||
|00004c80| 04 00 69 0a 00 64 08 00 | 83 01 00 70 04 00 01 64 |..i..d..|...p...d|
|00004c90| 09 00 83 01 00 7d 07 00 | 7c 06 00 64 1a 00 6a 09 |.....}..||..d..j.|
|00004ca0| 00 6f 3a 00 01 74 0d 00 | 7c 05 00 7c 06 00 17 69 |.o:..t..||..|...i|
|00004cb0| 0e 00 64 09 00 83 01 00 | 70 04 00 01 64 09 00 83 |..d.....|p...d...|
|00004cc0| 01 00 7c 03 00 5f 0f 00 | 7c 07 00 74 10 00 7c 06 |..|.._..||..t..|.|
|00004cd0| 00 83 01 00 18 7c 03 00 | 5f 11 00 6e 29 00 01 74 |.....|..|_..n)..t|
|00004ce0| 0d 00 7c 05 00 69 0e 00 | 64 09 00 83 01 00 70 04 |..|..i..|d.....p.|
|00004cf0| 00 01 64 09 00 83 01 00 | 7c 03 00 5f 0f 00 7c 07 |..d.....||.._..|.|
|00004d00| 00 7c 03 00 5f 11 00 74 | 12 00 7c 03 00 5f 13 00 |.|.._..t|..|.._..|
|00004d10| 6e 7a 00 01 7c 04 00 69 | 0a 00 64 0a 00 83 01 00 |nz..|..i|..d.....|
|00004d20| 7d 08 00 7c 08 00 64 1a | 00 6a 09 00 6f 42 00 01 |}..|..d.|.j..oB..|
|00004d30| 74 0d 00 7c 08 00 69 0e | 00 64 09 00 83 01 00 83 |t..|..i.|.d......|
|00004d40| 01 00 7c 03 00 5f 0f 00 | 7c 04 00 69 0a 00 64 0b |..|.._..||..i..d.|
|00004d50| 00 83 01 00 6f 0d 00 01 | 64 0c 00 7c 03 00 5f 11 |....o...|d..|.._.|
|00004d60| 00 71 cc 01 01 64 0d 00 | 7c 03 00 5f 11 00 6e 13 |.q...d..||.._..n.|
|00004d70| 00 01 64 09 00 7c 03 00 | 5f 0f 00 64 0e 00 7c 03 |..d..|..|_..d..|.|
|00004d80| 00 5f 11 00 74 14 00 7c | 03 00 5f 13 00 7c 03 00 |._..t..||.._..|..|
|00004d90| 53 01 74 02 00 7c 01 00 | 74 0c 00 74 15 00 66 02 |S.t..|..|t..t..f.|
|00004da0| 00 83 02 00 6f 4f 00 01 | 7c 01 00 64 05 00 6a 05 |....oO..||..d..j.|
|00004db0| 00 6f 0d 00 01 64 05 00 | 7c 03 00 5f 0b 00 6e 0a |.o...d..||.._..n.|
|00004dc0| 00 01 64 04 00 7c 03 00 | 5f 0b 00 64 05 00 7c 03 |..d..|..|_..d..|.|
|00004dd0| 00 5f 11 00 74 0d 00 74 | 16 00 7c 01 00 83 01 00 |._..t..t|..|.....|
|00004de0| 83 01 00 7c 03 00 5f 0f | 00 74 12 00 7c 03 00 5f |...|.._.|.t..|.._|
|00004df0| 13 00 7c 03 00 53 01 74 | 02 00 7c 01 00 74 17 00 |..|..S.t|..|..t..|
|00004e00| 83 02 00 6f 35 00 01 7c | 01 00 69 11 00 7c 03 00 |...o5..||..i..|..|
|00004e10| 5f 11 00 7c 01 00 69 0b | 00 7c 03 00 5f 0b 00 7c |_..|..i.|.|.._..||
|00004e20| 01 00 69 0f 00 7c 03 00 | 5f 0f 00 7c 01 00 69 13 |..i..|..|_..|..i.|
|00004e30| 00 7c 03 00 5f 13 00 7c | 03 00 53 01 74 02 00 7c |.|.._..||..S.t..||
|00004e40| 01 00 74 18 00 83 02 00 | 6f 3e 00 01 7c 01 00 69 |..t.....|o>..|..i|
|00004e50| 19 00 7c 03 00 5f 0b 00 | 74 0d 00 7c 01 00 69 0c |..|.._..|t..|..i.|
|00004e60| 00 83 01 00 7c 03 00 5f | 0f 00 74 0c 00 7c 01 00 |....|.._|..t..|..|
|00004e70| 69 1a 00 83 01 00 7c 03 | 00 5f 11 00 74 12 00 7c |i.....|.|._..t..||
|00004e80| 03 00 5f 13 00 7c 03 00 | 53 01 74 02 00 7c 01 00 |.._..|..|S.t..|..|
|00004e90| 74 1b 00 74 1c 00 66 02 | 00 83 02 00 6f d3 01 01 |t..t..f.|....o...|
|00004ea0| 74 10 00 7c 01 00 83 01 | 00 64 0f 00 6a 03 00 6f |t..|....|.d..j..o|
|00004eb0| 10 00 01 74 1d 00 64 10 | 00 83 01 00 82 01 00 6e |...t..d.|.......n|
|00004ec0| 01 00 01 74 02 00 7c 01 | 00 64 05 00 19 74 0c 00 |...t..|.|.d...t..|
|00004ed0| 74 15 00 66 02 00 83 02 | 00 6f 0e 00 01 7c 01 00 |t..f....|.o...|..|
|00004ee0| 64 05 00 19 64 1b 00 6a | 06 00 70 10 00 01 74 1d |d...d..j|..p...t.|
|00004ef0| 00 64 11 00 83 01 00 82 | 01 00 6e 01 00 01 7c 01 |.d......|..n...|.|
|00004f00| 00 64 05 00 19 7c 03 00 | 5f 0b 00 7c 01 00 64 12 |.d...|..|_..|..d.|
|00004f10| 00 19 64 0e 00 6a 02 00 | 6f 23 00 01 64 09 00 7c |..d..j..|o#..d..||
|00004f20| 03 00 5f 0f 00 7c 01 00 | 64 12 00 19 7c 03 00 5f |.._..|..|d...|.._|
|00004f30| 11 00 74 14 00 7c 03 00 | 5f 13 00 6e 30 01 01 67 |..t..|..|_..n0..g|
|00004f40| 00 00 7d 09 00 78 7b 00 | 7c 01 00 64 04 00 19 44 |..}..x{.||..d...D|
|00004f50| 5d 6f 00 7d 0a 00 74 02 | 00 7c 0a 00 74 0c 00 74 |]o.}..t.|.|..t..t|
|00004f60| 15 00 66 02 00 83 02 00 | 6f 47 00 01 64 05 00 7c |..f.....|oG..d..||
|00004f70| 0a 00 04 03 6a 01 00 6f | 0a 00 01 64 13 00 6a 01 |....j..o|...d..j.|
|00004f80| 00 6e 02 00 02 01 6f 29 | 00 01 7c 09 00 70 0d 00 |.n....o)|..|..p..|
|00004f90| 01 7c 0a 00 64 05 00 6a | 03 00 6f 11 00 01 7c 09 |.|..d..j|..o...|.|
|00004fa0| 00 69 1e 00 7c 0a 00 83 | 01 00 01 71 07 04 01 71 |.i..|...|...q...q|
|00004fb0| 98 03 01 74 1d 00 64 14 | 00 83 01 00 82 01 00 71 |...t..d.|.......q|
|00004fc0| 98 03 57 7c 01 00 64 12 | 00 19 64 1c 00 6a 06 00 |..W|..d.|..d..j..|
|00004fd0| 6f 35 00 01 64 15 00 69 | 1f 00 74 20 00 74 0d 00 |o5..d..i|..t .t..|
|00004fe0| 7c 09 00 83 02 00 83 01 | 00 7c 03 00 5f 0f 00 7c ||.......|.|.._..||
|00004ff0| 01 00 64 12 00 19 7c 03 | 00 5f 11 00 74 14 00 7c |..d...|.|._..t..||
|00005000| 03 00 5f 13 00 6e 66 00 | 01 74 02 00 7c 01 00 64 |.._..nf.|.t..|..d|
|00005010| 12 00 19 74 0c 00 74 15 | 00 66 02 00 83 02 00 6f |...t..t.|.f.....o|
|00005020| 3f 00 01 64 15 00 69 1f | 00 74 20 00 74 0d 00 7c |?..d..i.|.t .t..||
|00005030| 09 00 70 07 00 01 64 05 | 00 67 01 00 83 02 00 83 |..p...d.|.g......|
|00005040| 01 00 7c 03 00 5f 0f 00 | 7c 01 00 64 12 00 19 7c |..|.._..||..d...||
|00005050| 03 00 5f 11 00 74 12 00 | 7c 03 00 5f 13 00 6e 0d |.._..t..||.._..n.|
|00005060| 00 01 74 1d 00 64 16 00 | 83 01 00 82 01 00 7c 03 |..t..d..|......|.|
|00005070| 00 53 01 74 02 00 7c 01 | 00 74 21 00 83 02 00 6f |.S.t..|.|.t!....o|
|00005080| 14 00 01 74 22 00 64 17 | 00 64 18 00 17 83 01 00 |...t".d.|.d......|
|00005090| 82 01 00 6e 01 00 01 74 | 22 00 64 19 00 7c 01 00 |...n...t|".d..|..|
|000050a0| 16 83 01 00 82 01 00 64 | 1a 00 53 28 1d 00 00 00 |.......d|..S(....|
|000050b0| 73 f2 01 00 00 43 72 65 | 61 74 65 20 61 20 64 65 |s....Cre|ate a de|
|000050c0| 63 69 6d 61 6c 20 70 6f | 69 6e 74 20 69 6e 73 74 |cimal po|int inst|
|000050d0| 61 6e 63 65 2e 0a 0a 20 | 20 20 20 20 20 20 20 3e |ance... | >|
|000050e0| 3e 3e 20 44 65 63 69 6d | 61 6c 28 27 33 2e 31 34 |>> Decim|al('3.14|
|000050f0| 27 29 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |') | |
|00005100| 23 20 73 74 72 69 6e 67 | 20 69 6e 70 75 74 0a 20 |# string| input. |
|00005110| 20 20 20 20 20 20 20 44 | 65 63 69 6d 61 6c 28 27 | D|ecimal('|
|00005120| 33 2e 31 34 27 29 0a 20 | 20 20 20 20 20 20 20 3e |3.14'). | >|
|00005130| 3e 3e 20 44 65 63 69 6d | 61 6c 28 28 30 2c 20 28 |>> Decim|al((0, (|
|00005140| 33 2c 20 31 2c 20 34 29 | 2c 20 2d 32 29 29 20 20 |3, 1, 4)|, -2)) |
|00005150| 23 20 74 75 70 6c 65 20 | 28 73 69 67 6e 2c 20 64 |# tuple |(sign, d|
|00005160| 69 67 69 74 5f 74 75 70 | 6c 65 2c 20 65 78 70 6f |igit_tup|le, expo|
|00005170| 6e 65 6e 74 29 0a 20 20 | 20 20 20 20 20 20 44 65 |nent). | De|
|00005180| 63 69 6d 61 6c 28 27 33 | 2e 31 34 27 29 0a 20 20 |cimal('3|.14'). |
|00005190| 20 20 20 20 20 20 3e 3e | 3e 20 44 65 63 69 6d 61 | >>|> Decima|
|000051a0| 6c 28 33 31 34 29 20 20 | 20 20 20 20 20 20 20 20 |l(314) | |
|000051b0| 20 20 20 20 20 20 20 23 | 20 69 6e 74 20 6f 72 20 | #| int or |
|000051c0| 6c 6f 6e 67 0a 20 20 20 | 20 20 20 20 20 44 65 63 |long. | Dec|
|000051d0| 69 6d 61 6c 28 27 33 31 | 34 27 29 0a 20 20 20 20 |imal('31|4'). |
|000051e0| 20 20 20 20 3e 3e 3e 20 | 44 65 63 69 6d 61 6c 28 | >>> |Decimal(|
|000051f0| 44 65 63 69 6d 61 6c 28 | 33 31 34 29 29 20 20 20 |Decimal(|314)) |
|00005200| 20 20 20 20 20 23 20 61 | 6e 6f 74 68 65 72 20 64 | # a|nother d|
|00005210| 65 63 69 6d 61 6c 20 69 | 6e 73 74 61 6e 63 65 0a |ecimal i|nstance.|
|00005220| 20 20 20 20 20 20 20 20 | 44 65 63 69 6d 61 6c 28 | |Decimal(|
|00005230| 27 33 31 34 27 29 0a 20 | 20 20 20 20 20 20 20 3e |'314'). | >|
|00005240| 3e 3e 20 44 65 63 69 6d | 61 6c 28 27 20 20 33 2e |>> Decim|al(' 3.|
|00005250| 31 34 20 20 5c 6e 27 29 | 20 20 20 20 20 20 20 20 |14 \n')| |
|00005260| 23 20 6c 65 61 64 69 6e | 67 20 61 6e 64 20 74 72 |# leadin|g and tr|
|00005270| 61 69 6c 69 6e 67 20 77 | 68 69 74 65 73 70 61 63 |ailing w|hitespac|
|00005280| 65 20 6f 6b 61 79 0a 20 | 20 20 20 20 20 20 20 44 |e okay. | D|
|00005290| 65 63 69 6d 61 6c 28 27 | 33 2e 31 34 27 29 0a 20 |ecimal('|3.14'). |
|000052a0| 20 20 20 20 20 20 20 73 | 1f 00 00 00 49 6e 76 61 | s|....Inva|
|000052b0| 6c 69 64 20 6c 69 74 65 | 72 61 6c 20 66 6f 72 20 |lid lite|ral for |
|000052c0| 44 65 63 69 6d 61 6c 3a | 20 25 72 52 2d 00 00 00 |Decimal:| %rR-...|
|000052d0| 74 01 00 00 00 2d 69 01 | 00 00 00 69 00 00 00 00 |t....-i.|...i....|
|000052e0| 74 03 00 00 00 69 6e 74 | 74 04 00 00 00 66 72 61 |t....int|t....fra|
|000052f0| 63 74 03 00 00 00 65 78 | 70 52 45 00 00 00 74 04 |ct....ex|pRE...t.|
|00005300| 00 00 00 64 69 61 67 74 | 06 00 00 00 73 69 67 6e |...diagt|....sign|
|00005310| 61 6c 74 01 00 00 00 4e | 52 23 00 00 00 74 01 00 |alt....N|R#...t..|
|00005320| 00 00 46 69 03 00 00 00 | 73 74 00 00 00 49 6e 76 |..Fi....|st...Inv|
|00005330| 61 6c 69 64 20 74 75 70 | 6c 65 20 73 69 7a 65 20 |alid tup|le size |
|00005340| 69 6e 20 63 72 65 61 74 | 69 6f 6e 20 6f 66 20 44 |in creat|ion of D|
|00005350| 65 63 69 6d 61 6c 20 66 | 72 6f 6d 20 6c 69 73 74 |ecimal f|rom list|
|00005360| 20 6f 72 20 74 75 70 6c | 65 2e 20 20 54 68 65 20 | or tupl|e. The |
|00005370| 6c 69 73 74 20 6f 72 20 | 74 75 70 6c 65 20 73 68 |list or |tuple sh|
|00005380| 6f 75 6c 64 20 68 61 76 | 65 20 65 78 61 63 74 6c |ould hav|e exactl|
|00005390| 79 20 74 68 72 65 65 20 | 65 6c 65 6d 65 6e 74 73 |y three |elements|
|000053a0| 2e 73 7c 00 00 00 49 6e | 76 61 6c 69 64 20 73 69 |.s|...In|valid si|
|000053b0| 67 6e 2e 20 20 54 68 65 | 20 66 69 72 73 74 20 76 |gn. The| first v|
|000053c0| 61 6c 75 65 20 69 6e 20 | 74 68 65 20 74 75 70 6c |alue in |the tupl|
|000053d0| 65 20 73 68 6f 75 6c 64 | 20 62 65 20 61 6e 20 69 |e should| be an i|
|000053e0| 6e 74 65 67 65 72 3b 20 | 65 69 74 68 65 72 20 30 |nteger; |either 0|
|000053f0| 20 66 6f 72 20 61 20 70 | 6f 73 69 74 69 76 65 20 | for a p|ositive |
|00005400| 6e 75 6d 62 65 72 20 6f | 72 20 31 20 66 6f 72 20 |number o|r 1 for |
|00005410| 61 20 6e 65 67 61 74 69 | 76 65 20 6e 75 6d 62 65 |a negati|ve numbe|
|00005420| 72 2e 69 02 00 00 00 69 | 09 00 00 00 73 54 00 00 |r.i....i|....sT..|
|00005430| 00 54 68 65 20 73 65 63 | 6f 6e 64 20 76 61 6c 75 |.The sec|ond valu|
|00005440| 65 20 69 6e 20 74 68 65 | 20 74 75 70 6c 65 20 6d |e in the| tuple m|
|00005450| 75 73 74 20 62 65 20 63 | 6f 6d 70 6f 73 65 64 20 |ust be c|omposed |
|00005460| 6f 66 20 69 6e 74 65 67 | 65 72 73 20 69 6e 20 74 |of integ|ers in t|
|00005470| 68 65 20 72 61 6e 67 65 | 20 30 20 74 68 72 6f 75 |he range| 0 throu|
|00005480| 67 68 20 39 2e 74 00 00 | 00 00 73 55 00 00 00 54 |gh 9.t..|..sU...T|
|00005490| 68 65 20 74 68 69 72 64 | 20 76 61 6c 75 65 20 69 |he third| value i|
|000054a0| 6e 20 74 68 65 20 74 75 | 70 6c 65 20 6d 75 73 74 |n the tu|ple must|
|000054b0| 20 62 65 20 61 6e 20 69 | 6e 74 65 67 65 72 2c 20 | be an i|nteger, |
|000054c0| 6f 72 20 6f 6e 65 20 6f | 66 20 74 68 65 20 73 74 |or one o|f the st|
|000054d0| 72 69 6e 67 73 20 27 46 | 27 2c 20 27 6e 27 2c 20 |rings 'F|', 'n', |
|000054e0| 27 4e 27 2e 73 22 00 00 | 00 43 61 6e 6e 6f 74 20 |'N'.s"..|.Cannot |
|000054f0| 63 6f 6e 76 65 72 74 20 | 66 6c 6f 61 74 20 74 6f |convert |float to|
|00005500| 20 44 65 63 69 6d 61 6c | 2e 20 20 73 23 00 00 00 | Decimal|. s#...|
|00005510| 46 69 72 73 74 20 63 6f | 6e 76 65 72 74 20 74 68 |First co|nvert th|
|00005520| 65 20 66 6c 6f 61 74 20 | 74 6f 20 61 20 73 74 72 |e float |to a str|
|00005530| 69 6e 67 73 1c 00 00 00 | 43 61 6e 6e 6f 74 20 63 |ings....|Cannot c|
|00005540| 6f 6e 76 65 72 74 20 25 | 72 20 74 6f 20 44 65 63 |onvert %|r to Dec|
|00005550| 69 6d 61 6c 4e 28 02 00 | 00 00 69 00 00 00 00 69 |imalN(..|..i....i|
|00005560| 01 00 00 00 28 02 00 00 | 00 52 23 00 00 00 52 4c |....(...|.R#...RL|
|00005570| 00 00 00 28 23 00 00 00 | 74 06 00 00 00 6f 62 6a |...(#...|t....obj|
|00005580| 65 63 74 74 07 00 00 00 | 5f 5f 6e 65 77 5f 5f 74 |ectt....|__new__t|
|00005590| 0a 00 00 00 69 73 69 6e | 73 74 61 6e 63 65 74 0a |....isin|stancet.|
|000055a0| 00 00 00 62 61 73 65 73 | 74 72 69 6e 67 74 07 00 |...bases|tringt..|
|000055b0| 00 00 5f 70 61 72 73 65 | 72 74 05 00 00 00 73 74 |.._parse|rt....st|
|000055c0| 72 69 70 52 40 00 00 00 | 52 17 00 00 00 74 0c 00 |ripR@...|R....t..|
|000055d0| 00 00 5f 72 61 69 73 65 | 5f 65 72 72 6f 72 52 2b |.._raise|_errorR+|
|000055e0| 00 00 00 74 05 00 00 00 | 67 72 6f 75 70 52 25 00 |...t....|groupR%.|
|000055f0| 00 00 52 47 00 00 00 74 | 03 00 00 00 73 74 72 74 |..RG...t|....strt|
|00005600| 06 00 00 00 6c 73 74 72 | 69 70 52 26 00 00 00 74 |....lstr|ipR&...t|
|00005610| 03 00 00 00 6c 65 6e 52 | 43 00 00 00 74 05 00 00 |....lenR|C...t...|
|00005620| 00 46 61 6c 73 65 52 44 | 00 00 00 52 27 00 00 00 |.FalseRD|...R'...|
|00005630| 74 04 00 00 00 6c 6f 6e | 67 74 03 00 00 00 61 62 |t....lon|gt....ab|
|00005640| 73 52 00 00 00 00 74 08 | 00 00 00 5f 57 6f 72 6b |sR....t.|..._Work|
|00005650| 52 65 70 52 2d 00 00 00 | 52 49 00 00 00 74 04 00 |RepR-...|RI...t..|
|00005660| 00 00 6c 69 73 74 74 05 | 00 00 00 74 75 70 6c 65 |..listt.|...tuple|
|00005670| 74 0a 00 00 00 56 61 6c | 75 65 45 72 72 6f 72 74 |t....Val|ueErrort|
|00005680| 06 00 00 00 61 70 70 65 | 6e 64 74 04 00 00 00 6a |....appe|ndt....j|
|00005690| 6f 69 6e 74 03 00 00 00 | 6d 61 70 74 05 00 00 00 |oint....|mapt....|
|000056a0| 66 6c 6f 61 74 74 09 00 | 00 00 54 79 70 65 45 72 |floatt..|..TypeEr|
|000056b0| 72 6f 72 28 0b 00 00 00 | 74 03 00 00 00 63 6c 73 |ror(....|t....cls|
|000056c0| 74 05 00 00 00 76 61 6c | 75 65 52 1e 00 00 00 52 |t....val|ueR....R|
|000056d0| 1d 00 00 00 74 01 00 00 | 00 6d 74 07 00 00 00 69 |....t...|.mt....i|
|000056e0| 6e 74 70 61 72 74 74 08 | 00 00 00 66 72 61 63 70 |ntpartt.|...fracp|
|000056f0| 61 72 74 52 49 00 00 00 | 52 4a 00 00 00 74 06 00 |artRI...|RJ...t..|
|00005700| 00 00 64 69 67 69 74 73 | 74 05 00 00 00 64 69 67 |..digits|t....dig|
|00005710| 69 74 28 00 00 00 00 28 | 00 00 00 00 73 1d 00 00 |it(....(|....s...|
|00005720| 00 2f 75 73 72 2f 6c 69 | 62 2f 70 79 74 68 6f 6e |./usr/li|b/python|
|00005730| 32 2e 36 2f 64 65 63 69 | 6d 61 6c 2e 70 79 52 50 |2.6/deci|mal.pyRP|
|00005740| 00 00 00 00 02 00 00 73 | a4 00 00 00 00 17 0f 04 |.......s|........|
|00005750| 10 01 12 01 0d 01 0d 01 | 0d 01 09 01 0c 02 16 01 |........|........|
|00005760| 0d 02 09 01 0f 01 0d 02 | 0f 01 1c 01 0d 01 23 01 |........|......#.|
|00005770| 17 02 1f 01 09 01 0d 02 | 0f 01 0d 02 18 01 10 01 |........|........|
|00005780| 0d 02 0d 03 09 01 09 01 | 09 01 05 03 16 01 0d 01 |........|........|
|00005790| 0d 02 09 01 09 01 15 01 | 09 01 05 03 10 01 0c 01 |........|........|
|000057a0| 0c 01 0c 01 0c 01 05 03 | 10 01 0c 01 12 01 12 01 |........|........|
|000057b0| 09 01 05 03 16 01 13 01 | 10 04 2b 01 10 03 0d 01 |........|..+.....|
|000057c0| 11 02 09 01 0d 01 0d 03 | 06 01 0b 00 06 01 34 02 |........|......4.|
|000057d0| 14 01 15 02 10 03 11 02 | 1b 01 0d 01 0d 01 1a 02 |........|........|
|000057e0| 25 01 0d 01 0d 02 0c 03 | 05 02 10 01 06 01 0e 02 |%.......|........|
|000057f0| 63 01 00 00 00 02 00 00 | 00 02 00 00 00 43 00 00 |c.......|.....C..|
|00005800| 00 73 3f 00 00 00 7c 00 | 00 69 00 00 6f 31 00 01 |.s?...|.|.i..o1..|
|00005810| 7c 00 00 69 01 00 7d 01 | 00 7c 01 00 64 01 00 6a ||..i..}.|.|..d..j|
|00005820| 02 00 6f 05 00 01 64 02 | 00 53 01 7c 01 00 64 03 |..o...d.|.S.|..d.|
|00005830| 00 6a 02 00 6f 05 00 01 | 64 04 00 53 01 6e 01 00 |.j..o...|d..S.n..|
|00005840| 01 64 05 00 53 28 06 00 | 00 00 73 72 00 00 00 52 |.d..S(..|..sr...R|
|00005850| 65 74 75 72 6e 73 20 77 | 68 65 74 68 65 72 20 74 |eturns w|hether t|
|00005860| 68 65 20 6e 75 6d 62 65 | 72 20 69 73 20 6e 6f 74 |he numbe|r is not|
|00005870| 20 61 63 74 75 61 6c 6c | 79 20 6f 6e 65 2e 0a 0a | actuall|y one...|
|00005880| 20 20 20 20 20 20 20 20 | 30 20 69 66 20 61 20 6e | |0 if a n|
|00005890| 75 6d 62 65 72 0a 20 20 | 20 20 20 20 20 20 31 20 |umber. | 1 |
|000058a0| 69 66 20 4e 61 4e 0a 20 | 20 20 20 20 20 20 20 32 |if NaN. | 2|
|000058b0| 20 69 66 20 73 4e 61 4e | 0a 20 20 20 20 20 20 20 | if sNaN|. |
|000058c0| 20 52 23 00 00 00 69 01 | 00 00 00 52 4c 00 00 00 | R#...i.|...RL...|
|000058d0| 69 02 00 00 00 69 00 00 | 00 00 28 02 00 00 00 52 |i....i..|..(....R|
|000058e0| 44 00 00 00 52 43 00 00 | 00 28 02 00 00 00 52 1d |D...RC..|.(....R.|
|000058f0| 00 00 00 52 49 00 00 00 | 28 00 00 00 00 28 00 00 |...RI...|(....(..|
|00005900| 00 00 73 1d 00 00 00 2f | 75 73 72 2f 6c 69 62 2f |..s..../|usr/lib/|
|00005910| 70 79 74 68 6f 6e 32 2e | 36 2f 64 65 63 69 6d 61 |python2.|6/decima|
|00005920| 6c 2e 70 79 74 06 00 00 | 00 5f 69 73 6e 61 6e 91 |l.pyt...|._isnan.|
|00005930| 02 00 00 73 0e 00 00 00 | 00 07 0a 01 09 01 0d 01 |...s....|........|
|00005940| 05 01 0d 01 09 01 63 01 | 00 00 00 01 00 00 00 02 |......c.|........|
|00005950| 00 00 00 43 00 00 00 73 | 28 00 00 00 7c 00 00 69 |...C...s|(...|..i|
|00005960| 00 00 64 01 00 6a 02 00 | 6f 14 00 01 7c 00 00 69 |..d..j..|o...|..i|
|00005970| 01 00 6f 05 00 01 64 02 | 00 53 01 64 03 00 53 01 |..o...d.|.S.d..S.|
|00005980| 64 04 00 53 28 05 00 00 | 00 73 79 00 00 00 52 65 |d..S(...|.sy...Re|
|00005990| 74 75 72 6e 73 20 77 68 | 65 74 68 65 72 20 74 68 |turns wh|ether th|
|000059a0| 65 20 6e 75 6d 62 65 72 | 20 69 73 20 69 6e 66 69 |e number| is infi|
|000059b0| 6e 69 74 65 0a 0a 20 20 | 20 20 20 20 20 20 30 20 |nite.. | 0 |
|000059c0| 69 66 20 66 69 6e 69 74 | 65 20 6f 72 20 6e 6f 74 |if finit|e or not|
|000059d0| 20 61 20 6e 75 6d 62 65 | 72 0a 20 20 20 20 20 20 | a numbe|r. |
|000059e0| 20 20 31 20 69 66 20 2b | 49 4e 46 0a 20 20 20 20 | 1 if +|INF. |
|000059f0| 20 20 20 20 2d 31 20 69 | 66 20 2d 49 4e 46 0a 20 | -1 i|f -INF. |
|00005a00| 20 20 20 20 20 20 20 52 | 4d 00 00 00 69 ff ff ff | R|M...i...|
|00005a10| ff 69 01 00 00 00 69 00 | 00 00 00 28 02 00 00 00 |.i....i.|...(....|
|00005a20| 52 43 00 00 00 52 25 00 | 00 00 28 01 00 00 00 52 |RC...R%.|..(....R|
|00005a30| 1d 00 00 00 28 00 00 00 | 00 28 00 00 00 00 73 1d |....(...|.(....s.|
|00005a40| 00 00 00 2f 75 73 72 2f | 6c 69 62 2f 70 79 74 68 |.../usr/|lib/pyth|
|00005a50| 6f 6e 32 2e 36 2f 64 65 | 63 69 6d 61 6c 2e 70 79 |on2.6/de|cimal.py|
|00005a60| 74 0b 00 00 00 5f 69 73 | 69 6e 66 69 6e 69 74 79 |t...._is|infinity|
|00005a70| a0 02 00 00 73 0a 00 00 | 00 00 07 10 01 0a 01 05 |....s...|........|
|00005a80| 01 05 01 63 03 00 00 00 | 05 00 00 00 04 00 00 00 |...c....|........|
|00005a90| 43 00 00 00 73 c0 00 00 | 00 7c 00 00 69 00 00 83 |C...s...|.|..i...|
|00005aa0| 00 00 7d 03 00 7c 01 00 | 64 04 00 6a 08 00 6f 0a |..}..|..|d..j..o.|
|00005ab0| 00 01 74 02 00 7d 04 00 | 6e 0d 00 01 7c 01 00 69 |..t..}..|n...|..i|
|00005ac0| 00 00 83 00 00 7d 04 00 | 7c 03 00 70 07 00 01 7c |.....}..||..p...||
|00005ad0| 04 00 6f 7f 00 01 7c 02 | 00 64 04 00 6a 08 00 6f |..o...|.|.d..j..o|
|00005ae0| 0d 00 01 74 03 00 83 00 | 00 7d 02 00 6e 01 00 01 |...t....|.}..n...|
|00005af0| 7c 03 00 64 01 00 6a 02 | 00 6f 14 00 01 7c 02 00 ||..d..j.|.o...|..|
|00005b00| 69 04 00 74 05 00 64 02 | 00 7c 00 00 83 03 00 53 |i..t..d.|.|.....S|
|00005b10| 01 7c 04 00 64 01 00 6a | 02 00 6f 14 00 01 7c 02 |.|..d..j|..o...|.|
|00005b20| 00 69 04 00 74 05 00 64 | 02 00 7c 01 00 83 03 00 |.i..t..d|..|.....|
|00005b30| 53 01 7c 03 00 6f 0e 00 | 01 7c 00 00 69 06 00 7c |S.|..o..|.|..i..||
|00005b40| 02 00 83 01 00 53 01 7c | 01 00 69 06 00 7c 02 00 |.....S.||..i..|..|
|00005b50| 83 01 00 53 01 64 03 00 | 53 28 05 00 00 00 73 bd |...S.d..|S(....s.|
|00005b60| 00 00 00 52 65 74 75 72 | 6e 73 20 77 68 65 74 68 |...Retur|ns wheth|
|00005b70| 65 72 20 74 68 65 20 6e | 75 6d 62 65 72 20 69 73 |er the n|umber is|
|00005b80| 20 6e 6f 74 20 61 63 74 | 75 61 6c 6c 79 20 6f 6e | not act|ually on|
|00005b90| 65 2e 0a 0a 20 20 20 20 | 20 20 20 20 69 66 20 73 |e... | if s|
|00005ba0| 65 6c 66 2c 20 6f 74 68 | 65 72 20 61 72 65 20 73 |elf, oth|er are s|
|00005bb0| 4e 61 4e 2c 20 73 69 67 | 6e 61 6c 0a 20 20 20 20 |NaN, sig|nal. |
|00005bc0| 20 20 20 20 69 66 20 73 | 65 6c 66 2c 20 6f 74 68 | if s|elf, oth|
|00005bd0| 65 72 20 61 72 65 20 4e | 61 4e 20 72 65 74 75 72 |er are N|aN retur|
|00005be0| 6e 20 6e 61 6e 0a 20 20 | 20 20 20 20 20 20 72 65 |n nan. | re|
|00005bf0| 74 75 72 6e 20 30 0a 0a | 20 20 20 20 20 20 20 20 |turn 0..| |
|00005c00| 44 6f 6e 65 20 62 65 66 | 6f 72 65 20 6f 70 65 72 |Done bef|ore oper|
|00005c10| 61 74 69 6f 6e 73 2e 0a | 20 20 20 20 20 20 20 20 |ations..| |
|00005c20| 69 02 00 00 00 74 04 00 | 00 00 73 4e 61 4e 69 00 |i....t..|..sNaNi.|
|00005c30| 00 00 00 4e 28 07 00 00 | 00 52 6d 00 00 00 52 40 |...N(...|.Rm...R@|
|00005c40| 00 00 00 52 5a 00 00 00 | 52 17 00 00 00 52 55 00 |...RZ...|R....RU.|
|00005c50| 00 00 52 07 00 00 00 52 | 28 00 00 00 28 05 00 00 |..R....R|(...(...|
|00005c60| 00 52 1d 00 00 00 74 05 | 00 00 00 6f 74 68 65 72 |.R....t.|...other|
|00005c70| 52 1e 00 00 00 74 0b 00 | 00 00 73 65 6c 66 5f 69 |R....t..|..self_i|
|00005c80| 73 5f 6e 61 6e 74 0c 00 | 00 00 6f 74 68 65 72 5f |s_nant..|..other_|
|00005c90| 69 73 5f 6e 61 6e 28 00 | 00 00 00 28 00 00 00 00 |is_nan(.|...(....|
|00005ca0| 73 1d 00 00 00 2f 75 73 | 72 2f 6c 69 62 2f 70 79 |s..../us|r/lib/py|
|00005cb0| 74 68 6f 6e 32 2e 36 2f | 64 65 63 69 6d 61 6c 2e |thon2.6/|decimal.|
|00005cc0| 70 79 74 0b 00 00 00 5f | 63 68 65 63 6b 5f 6e 61 |pyt...._|check_na|
|00005cd0| 6e 73 ad 02 00 00 73 22 | 00 00 00 00 0a 0c 01 0d |ns....s"|........|
|00005ce0| 01 0a 02 0c 02 0e 01 0d | 01 0d 02 0d 01 0c 01 08 |........|........|
|00005cf0| 01 0d 01 0c 01 08 01 07 | 01 0e 02 0e 01 63 03 00 |........|.....c..|
|00005d00| 00 00 03 00 00 00 04 00 | 00 00 43 00 00 00 73 ba |........|..C...s.|
|00005d10| 00 00 00 7c 02 00 64 04 | 00 6a 08 00 6f 0d 00 01 |...|..d.|.j..o...|
|00005d20| 74 01 00 83 00 00 7d 02 | 00 6e 01 00 01 7c 00 00 |t.....}.|.n...|..|
|00005d30| 69 02 00 70 0a 00 01 7c | 01 00 69 02 00 6f 88 00 |i..p...||..i..o..|
|00005d40| 01 7c 00 00 69 03 00 83 | 00 00 6f 14 00 01 7c 02 |.|..i...|..o...|.|
|00005d50| 00 69 04 00 74 05 00 64 | 01 00 7c 00 00 83 03 00 |.i..t..d|..|.....|
|00005d60| 53 01 7c 01 00 69 03 00 | 83 00 00 6f 14 00 01 7c |S.|..i..|...o...||
|00005d70| 02 00 69 04 00 74 05 00 | 64 01 00 7c 01 00 83 03 |..i..t..|d..|....|
|00005d80| 00 53 01 7c 00 00 69 06 | 00 83 00 00 6f 14 00 01 |.S.|..i.|....o...|
|00005d90| 7c 02 00 69 04 00 74 05 | 00 64 02 00 7c 00 00 83 ||..i..t.|.d..|...|
|00005da0| 03 00 53 01 7c 01 00 69 | 06 00 83 00 00 6f 14 00 |..S.|..i|.....o..|
|00005db0| 01 7c 02 00 69 04 00 74 | 05 00 64 02 00 7c 01 00 |.|..i..t|..d..|..|
|00005dc0| 83 03 00 53 01 6e 01 00 | 01 64 03 00 53 28 05 00 |...S.n..|.d..S(..|
|00005dd0| 00 00 73 43 01 00 00 56 | 65 72 73 69 6f 6e 20 6f |..sC...V|ersion o|
|00005de0| 66 20 5f 63 68 65 63 6b | 5f 6e 61 6e 73 20 75 73 |f _check|_nans us|
|00005df0| 65 64 20 66 6f 72 20 74 | 68 65 20 73 69 67 6e 61 |ed for t|he signa|
|00005e00| 6c 69 6e 67 20 63 6f 6d | 70 61 72 69 73 6f 6e 73 |ling com|parisons|
|00005e10| 0a 20 20 20 20 20 20 20 | 20 63 6f 6d 70 61 72 65 |. | compare|
|00005e20| 5f 73 69 67 6e 61 6c 2c | 20 5f 5f 6c 65 5f 5f 2c |_signal,| __le__,|
|00005e30| 20 5f 5f 6c 74 5f 5f 2c | 20 5f 5f 67 65 5f 5f 2c | __lt__,| __ge__,|
|00005e40| 20 5f 5f 67 74 5f 5f 2e | 0a 0a 20 20 20 20 20 20 | __gt__.|.. |
|00005e50| 20 20 53 69 67 6e 61 6c | 20 49 6e 76 61 6c 69 64 | Signal| Invalid|
|00005e60| 4f 70 65 72 61 74 69 6f | 6e 20 69 66 20 65 69 74 |Operatio|n if eit|
|00005e70| 68 65 72 20 73 65 6c 66 | 20 6f 72 20 6f 74 68 65 |her self| or othe|
|00005e80| 72 20 69 73 20 61 20 28 | 71 75 69 65 74 0a 20 20 |r is a (|quiet. |
|00005e90| 20 20 20 20 20 20 6f 72 | 20 73 69 67 6e 61 6c 69 | or| signali|
|00005ea0| 6e 67 29 20 4e 61 4e 2e | 20 20 53 69 67 6e 61 6c |ng) NaN.| Signal|
|00005eb0| 69 6e 67 20 4e 61 4e 73 | 20 74 61 6b 65 20 70 72 |ing NaNs| take pr|
|00005ec0| 65 63 65 64 65 6e 63 65 | 20 6f 76 65 72 20 71 75 |ecedence| over qu|
|00005ed0| 69 65 74 0a 20 20 20 20 | 20 20 20 20 4e 61 4e 73 |iet. | NaNs|
|00005ee0| 2e 0a 0a 20 20 20 20 20 | 20 20 20 52 65 74 75 72 |... | Retur|
|00005ef0| 6e 20 30 20 69 66 20 6e | 65 69 74 68 65 72 20 6f |n 0 if n|either o|
|00005f00| 70 65 72 61 6e 64 20 69 | 73 20 61 20 4e 61 4e 2e |perand i|s a NaN.|
|00005f10| 0a 0a 20 20 20 20 20 20 | 20 20 73 19 00 00 00 63 |.. | s....c|
|00005f20| 6f 6d 70 61 72 69 73 6f | 6e 20 69 6e 76 6f 6c 76 |ompariso|n involv|
|00005f30| 69 6e 67 20 73 4e 61 4e | 73 18 00 00 00 63 6f 6d |ing sNaN|s....com|
|00005f40| 70 61 72 69 73 6f 6e 20 | 69 6e 76 6f 6c 76 69 6e |parison |involvin|
|00005f50| 67 20 4e 61 4e 69 00 00 | 00 00 4e 28 07 00 00 00 |g NaNi..|..N(....|
|00005f60| 52 40 00 00 00 52 17 00 | 00 00 52 44 00 00 00 74 |R@...R..|..RD...t|
|00005f70| 07 00 00 00 69 73 5f 73 | 6e 61 6e 52 55 00 00 00 |....is_s|nanRU...|
|00005f80| 52 07 00 00 00 74 07 00 | 00 00 69 73 5f 71 6e 61 |R....t..|..is_qna|
|00005f90| 6e 28 03 00 00 00 52 1d | 00 00 00 52 70 00 00 00 |n(....R.|...Rp...|
|00005fa0| 52 1e 00 00 00 28 00 00 | 00 00 28 00 00 00 00 73 |R....(..|..(....s|
|00005fb0| 1d 00 00 00 2f 75 73 72 | 2f 6c 69 62 2f 70 79 74 |..../usr|/lib/pyt|
|00005fc0| 68 6f 6e 32 2e 36 2f 64 | 65 63 69 6d 61 6c 2e 70 |hon2.6/d|ecimal.p|
|00005fd0| 79 74 13 00 00 00 5f 63 | 6f 6d 70 61 72 65 5f 63 |yt...._c|ompare_c|
|00005fe0| 68 65 63 6b 5f 6e 61 6e | 73 cd 02 00 00 73 28 00 |heck_nan|s....s(.|
|00005ff0| 00 00 00 0b 0d 01 0d 02 | 14 01 0d 01 09 01 03 01 |........|........|
|00006000| 08 01 0d 01 09 01 03 01 | 08 01 0d 01 09 01 03 01 |........|........|
|00006010| 08 01 0d 01 09 01 03 01 | 0c 01 63 01 00 00 00 01 |........|..c.....|
|00006020| 00 00 00 02 00 00 00 43 | 00 00 00 73 17 00 00 00 |.......C|...s....|
|00006030| 7c 00 00 69 00 00 70 0d | 00 01 7c 00 00 69 01 00 ||..i..p.|..|..i..|
|00006040| 64 01 00 6a 03 00 53 28 | 02 00 00 00 73 75 00 00 |d..j..S(|....su..|
|00006050| 00 52 65 74 75 72 6e 20 | 54 72 75 65 20 69 66 20 |.Return |True if |
|00006060| 73 65 6c 66 20 69 73 20 | 6e 6f 6e 7a 65 72 6f 3b |self is |nonzero;|
|00006070| 20 6f 74 68 65 72 77 69 | 73 65 20 72 65 74 75 72 | otherwi|se retur|
|00006080| 6e 20 46 61 6c 73 65 2e | 0a 0a 20 20 20 20 20 20 |n False.|.. |
|00006090| 20 20 4e 61 4e 73 20 61 | 6e 64 20 69 6e 66 69 6e | NaNs a|nd infin|
|000060a0| 69 74 69 65 73 20 61 72 | 65 20 63 6f 6e 73 69 64 |ities ar|e consid|
|000060b0| 65 72 65 64 20 6e 6f 6e | 7a 65 72 6f 2e 0a 20 20 |ered non|zero.. |
|000060c0| 20 20 20 20 20 20 52 45 | 00 00 00 28 02 00 00 00 | RE|...(....|
|000060d0| 52 44 00 00 00 52 26 00 | 00 00 28 01 00 00 00 52 |RD...R&.|..(....R|
|000060e0| 1d 00 00 00 28 00 00 00 | 00 28 00 00 00 00 73 1d |....(...|.(....s.|
|000060f0| 00 00 00 2f 75 73 72 2f | 6c 69 62 2f 70 79 74 68 |.../usr/|lib/pyth|
|00006100| 6f 6e 32 2e 36 2f 64 65 | 63 69 6d 61 6c 2e 70 79 |on2.6/de|cimal.py|
|00006110| 74 0b 00 00 00 5f 5f 6e | 6f 6e 7a 65 72 6f 5f 5f |t....__n|onzero__|
|00006120| ee 02 00 00 73 02 00 00 | 00 00 05 63 02 00 00 00 |....s...|...c....|
|00006130| 08 00 00 00 04 00 00 00 | 43 00 00 00 73 7d 01 00 |........|C...s}..|
|00006140| 00 7c 00 00 69 00 00 70 | 0a 00 01 7c 01 00 69 00 |.|..i..p|...|..i.|
|00006150| 00 6f 44 00 01 7c 00 00 | 69 01 00 83 00 00 7d 02 |.oD..|..|i.....}.|
|00006160| 00 7c 01 00 69 01 00 83 | 00 00 7d 03 00 7c 02 00 |.|..i...|..}..|..|
|00006170| 7c 03 00 6a 02 00 6f 05 | 00 01 64 01 00 53 01 7c ||..j..o.|..d..S.||
|00006180| 02 00 7c 03 00 6a 00 00 | 6f 05 00 01 64 02 00 53 |..|..j..|o...d..S|
|00006190| 01 64 03 00 53 6e 01 00 | 01 7c 00 00 70 1c 00 01 |.d..Sn..|.|..p...|
|000061a0| 7c 01 00 70 05 00 01 64 | 01 00 53 01 64 02 00 7c ||..p...d|..S.d..||
|000061b0| 01 00 69 02 00 13 0b 53 | 6e 01 00 01 7c 01 00 70 |..i....S|n...|..p|
|000061c0| 0c 00 01 64 02 00 7c 00 | 00 69 02 00 13 53 01 7c |...d..|.|.i...S.||
|000061d0| 01 00 69 02 00 7c 00 00 | 69 02 00 6a 00 00 6f 05 |..i..|..|i..j..o.|
|000061e0| 00 01 64 02 00 53 01 7c | 00 00 69 02 00 7c 01 00 |..d..S.||..i..|..|
|000061f0| 69 02 00 6a 00 00 6f 05 | 00 01 64 03 00 53 01 7c |i..j..o.|..d..S.||
|00006200| 00 00 69 03 00 83 00 00 | 7d 04 00 7c 01 00 69 03 |..i.....|}..|..i.|
|00006210| 00 83 00 00 7d 05 00 7c | 04 00 7c 05 00 6a 02 00 |....}..||..|..j..|
|00006220| 6f 71 00 01 7c 00 00 69 | 04 00 64 04 00 7c 00 00 |oq..|..i|..d..|..|
|00006230| 69 05 00 7c 01 00 69 05 | 00 18 14 17 7d 06 00 7c |i..|..i.|....}..||
|00006240| 01 00 69 04 00 64 04 00 | 7c 01 00 69 05 00 7c 00 |..i..d..||..i..|.|
|00006250| 00 69 05 00 18 14 17 7d | 07 00 7c 06 00 7c 07 00 |.i.....}|..|..|..|
|00006260| 6a 02 00 6f 05 00 01 64 | 01 00 53 01 7c 06 00 7c |j..o...d|..S.|..||
|00006270| 07 00 6a 00 00 6f 0d 00 | 01 64 02 00 7c 00 00 69 |..j..o..|.d..|..i|
|00006280| 02 00 13 0b 53 01 64 02 | 00 7c 00 00 69 02 00 13 |....S.d.|.|..i...|
|00006290| 53 6e 26 00 01 7c 04 00 | 7c 05 00 6a 04 00 6f 0c |Sn&..|..||..j..o.|
|000062a0| 00 01 64 02 00 7c 00 00 | 69 02 00 13 53 01 64 02 |..d..|..|i...S.d.|
|000062b0| 00 7c 00 00 69 02 00 13 | 0b 53 64 05 00 53 28 06 |.|..i...|.Sd..S(.|
|000062c0| 00 00 00 73 b8 00 00 00 | 43 6f 6d 70 61 72 65 20 |...s....|Compare |
|000062d0| 74 68 65 20 74 77 6f 20 | 6e 6f 6e 2d 4e 61 4e 20 |the two |non-NaN |
|000062e0| 64 65 63 69 6d 61 6c 20 | 69 6e 73 74 61 6e 63 65 |decimal |instance|
|000062f0| 73 20 73 65 6c 66 20 61 | 6e 64 20 6f 74 68 65 72 |s self a|nd other|
|00006300| 2e 0a 0a 20 20 20 20 20 | 20 20 20 52 65 74 75 72 |... | Retur|
|00006310| 6e 73 20 2d 31 20 69 66 | 20 73 65 6c 66 20 3c 20 |ns -1 if| self < |
|00006320| 6f 74 68 65 72 2c 20 30 | 20 69 66 20 73 65 6c 66 |other, 0| if self|
|00006330| 20 3d 3d 20 6f 74 68 65 | 72 20 61 6e 64 20 31 0a | == othe|r and 1.|
|00006340| 20 20 20 20 20 20 20 20 | 69 66 20 73 65 6c 66 20 | |if self |
|00006350| 3e 20 6f 74 68 65 72 2e | 20 20 54 68 69 73 20 72 |> other.| This r|
|00006360| 6f 75 74 69 6e 65 20 69 | 73 20 66 6f 72 20 69 6e |outine i|s for in|
|00006370| 74 65 72 6e 61 6c 20 75 | 73 65 20 6f 6e 6c 79 2e |ternal u|se only.|
|00006380| 69 00 00 00 00 69 ff ff | ff ff 69 01 00 00 00 52 |i....i..|..i....R|
|00006390| 45 00 00 00 4e 28 06 00 | 00 00 52 44 00 00 00 52 |E...N(..|..RD...R|
|000063a0| 6e 00 00 00 52 25 00 00 | 00 74 08 00 00 00 61 64 |n...R%..|.t....ad|
|000063b0| 6a 75 73 74 65 64 52 26 | 00 00 00 52 43 00 00 00 |justedR&|...RC...|
|000063c0| 28 08 00 00 00 52 1d 00 | 00 00 52 70 00 00 00 74 |(....R..|..Rp...t|
|000063d0| 08 00 00 00 73 65 6c 66 | 5f 69 6e 66 74 09 00 00 |....self|_inft...|
|000063e0| 00 6f 74 68 65 72 5f 69 | 6e 66 74 0d 00 00 00 73 |.other_i|nft....s|
|000063f0| 65 6c 66 5f 61 64 6a 75 | 73 74 65 64 74 0e 00 00 |elf_adju|stedt...|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.